on 2023 Dec 01 6:43 PM
Hi,
I'm looking to call an external API from a UI5 application in BTP and the requirement is to pass the user ID to the headers/query parameters or body of the API.
But, we need to make this user ID being passed without being visible in the console of the browser.
API works based on basic authentication which is configured on the destination.
Is there a way to achieve this?
I'm wondering if any additional properties in the destination could help to pass the user Id or email to the API, that way front-end app or the browser won't know about the details.
Please share.
Thanks,
Vinoth
Request clarification before answering.
Hi Vinoth,
I am also trying to send user ID to external API,Can you please let me know how you solved this ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello vinoth.sukumar ,
You might want to have a look at the following blogposts of mine, especially that you rely on the SAP managed approuter as I do:
Long story short you can have all the things like the user id embedded in the JWT token being passed in the Authorization header of your API.
I hope that helps; Piotr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, as you are relying on a managed approuter please refer to the sap approuter help:
https://help.sap.com/docs/btp/sap-business-technology-platform/managed-application-router
I hope that helps;
As you can't extend managed Approuter you have you either use SAP API Management, Cloud Integration or a custom CAP application to achieve this requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gregor,
Thanks, I think adding another layer as you mentioned is the only way to achieve this, or perhaps another option is to consider enabling principal propagation authentication with the back end service, as our external API is connected via cloud connector, any thoughts?
I was hoping to send dynamic values from the additional properties to header or query parameters, Additional parameter "sap.query" in destination has no effect | SAP Community. Is it possible to send dynamic values to headers?
Thanks,
Vinoth
Based on the documentation of approuter - Destination service only:
URL.headers.<header-name>
and not:
URL.query.<header-name>
which seems to be only supported by SAP Cloud SDK.
Then you should check the documentation: Extending Application Router
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
16 | |
12 | |
7 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.