on 2024 Sep 05 3:36 PM
Hello everyone,
I have created a Node.js CAP application(List report & Object page) using managed approuter and deployed it to cloud foundry. I have not added any kind of authentication in it, Package.json doesn't have an auth stanza in the requires section and this is what my xs-security file looks like :
When I go into my dev space and start the 'app-srv', it takes me to the index page where all the services are. But when i click on any service it gives 401 unauthorized . The interesting thing is when i access the app from the HTML5 Applications tab i can view the List report page and it shows me all the data.
I am also having the same issue with an app that i created with standalone approuter, As those applications dont appear in the HTML5 repository the only way to access them is through the link in your dev space. And that gives the authorization error.
Any ideas why this is happening ?
Request clarification before answering.
After adding mock authentication, I can access the services through the route provided in 'app-srv' application deployed in the CF. But when i try to access the UI (Listreport pages) through the approuter module deployed in CF it's still giving the authorization error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David21
When a CAP application is deployed to Cloud Foundry, it requires authentication by default. If you want to skip authentication, include the following configuration in package.json. Please note that this is for testing purpose only and not recommended for production.
"cds": {
"requires": {
"auth": "mocked",
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any ideas why this is happening @gregorw @MioYasutake .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried making changes to my xs-security file in the app that i created using the standalone router:
Redeployed it, And gave the role 'appTokenExchange' to my user in BTP. But it is still giving me the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to adjust your xs-security.json to include the scope uaa.user. Check this references:
https://docs.cloudfoundry.org/concepts/architecture/uaa.html#uaa-scopes
It's needed as you use the managed approuter and it does a token exchange from the Launchpad Authentication to your Applications XSUAA Instance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
10 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.