SAP-samples / cloud-cap-risk-management

The SAP Risk Management example applications show how to deploy a CAP (SAP Cloud Application Programming model) application to Cloud Foundry and Kyma.
Apache License 2.0
67 stars 94 forks source link

When accessing the Risks service in browser, not getting a basic auth popup #27

Closed ChandraDutt closed 1 year ago

ChandraDutt commented 1 year ago

Hi,

In Implement Roles and Authorization Checks In CAP (cap-roles), I am not getting a basic auth popup (Sign in to access this site) when accessing the Risks application and also Mitigations application.

I have defined .cdrsc.json file correctly. As other user raised an issue and as per @manjuX suggestions, I have tried clearing cache and other browser but it does not popup.

I am able to do basic auth with Service Endpoints using the defined mock users and getting error 401 if no auth (on postman), so mocking users of service is working properly, but it is just that the fiori apps not showing popup. Please advise.

smahati commented 1 year ago

Hi @ChandraDutt,

Can you share the versions of the tooling that you are using? You can find out by running the command cds v. Also share what version of UI5 select when generating the application. In general for our tutorials we would recommend using the latest versions of CDS and the plugins in VS Code.

In case you still face issues can you share your codebase on GitHub or as a zip file?

Best regards, Manju

ChandraDutt commented 1 year ago

Hi @manjuX,

Please find below result of command cds v, UI5 version selected is 1.109.3, I believe I have used latest CDS versions and plugins as I have installed them just before following the tutorial, but please let me know if below are not.

@sap/cds: 6.4.1 @sap/cds-compiler: 3.6.0 @sap/cds-dk: 6.4.1 @sap/cds-dk (global): 6.4.1 @sap/cds-foss: 4.0.0

Codebase on GitHub is at git@github.com:ChandraDutt/node-cap-vscode-tutorial.git, kindly let me know for more information.

Edit: I also tried UI5 version 1.110.1, but I am still not getting basic auth popup (Sign in to access this site).

Thank you.

smahati commented 1 year ago

Hi @ChandraDutt ,

I cloned your project and ran it with cds watch, when I click on the blue go button in the risks application, I get the prompt to enter my credentials. I also get the prompt in the mitigations application, but note that if you provide the credentials for one it takes it for both the apps so you will need to use a new incognito window. note that to clear the authorisation in an incognito window you need to close all other incognito tabs. I tried it in safari and edge.

Best regards, Manju

ChandraDutt commented 1 year ago

Hi @manjuX ,

Thanks a lot for your help checking it. I tried to access the application on Firefox now after your reply and it is prompting to enter credentials. My bad, I have not tried it earlier on firefox and apologies for that. It is still not working for me on Chrome or Edge, tried incognito(closing all windows) and clearing cookies, cache etc., But it is not concerned to this repo and I am closing the issue as it is working as expected. Thanks again.