-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAP Consuming Services - Reuse Service calling Destination with Client Credentials Flow fails #5205
Comments
A Reuse Service is called with the context of the Consumer Application (Clone of xsuaa-instance) In this context, subscriber tenant level destination lookup within reuse service runtime always fails |
We still don't fully understand your issue here. Our guess would be that you are trying to get a destination registered in a provider subaccount from a subscriber context right? It feels like you are trying to manually fetch provider client credential and use that to get a provider destination from subscriber. In this case, we would recommend not doing so because subscriber should never have access to the provider destinations. Instead, subscriber should delegate the call to provider and let provider call the destination or remote service. In subscriber context, subscriber can only get destinations from subscriber subaccount. If our understanding is correct, then please review your architecture for multi-tenancy. |
REUSE SERVICE USE CASE IS FAILING IN CLOUD SDK JSIn reuse service scenario, we use service broker @sap/sbf, In my case I use xsuaa as credentials provider. for my multi-tenant reuse Service B deployment, xsuaa credentilas are
My multi-tenant SaaS app A calls reuse service B For my Multi-tenant SaaS App A deployment,
|
Describe the bug
SAP internal CAP issue 17326
Scenario
B
reuse-service-b
reuse-b!b400638
sb-reuse-b!b400638
A
a!t400638
sb-a!t400638
reuse-service-b
reuse-service-b-service-instance
2cffb32b-3ebf-44b1-ad60-88af2d3ff2a8!b400638|reuse-b!b400638
sb-2cffb32b-3ebf-44b1-ad60-88af2d3ff2a8!b400638|reuse-b!b400638
service instance
reuse-service-b-service-instance
service binding credentialsHow to Test Scenario:
A
client-credentials JWT token usingA
token-A
nowtoken-A
client-id
,client-secret
... fromB
service binding in ApplicationA
A
toB
token-B
token B
- the client credentials tokenCallstack
The runtime still tries to use user-jwt token and terminates;
The consumer call corresponds to
consumer-A-clone-of-reuse-service-b-xsappname
In the runtime of service VCAP has xsappname of
reuse-b
The cloud SDK is matching clone-xsappname of the clone against the environment variable xsappname
No match and call fails at retrieveUserTOken() below
reuse service B xsuaa credentails in memory
xsuaa
credentials
from environmentincoming client-credentials
token
of the reuse service contains JWT clone of the service-instance of the reuse-service xsuaa client idobviously there is no match of client-id of the jwt to the rda-service-srv bound xsuaa service instance's client-id
getCredentialsWithJwt returns undefined
getServiceCredentials returns undefined
getXsuaaServiceCredentials throws error 'Could not find XSUAA service binding matching the token.'
The text was updated successfully, but these errors were encountered: