cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Facing Unauthorized:401 Issue while consuming CAP service on FIORI app in SAP KYMA Environment

0 Kudos
2,840

Dear Team,

I'm trying to deploy my full stack custom Fiori application on SAP BTP KYMA as two separate pods from AWS ECR private repository. Please find the git repository below,

Backend (CAP + HANA) : https://github.com/ranjith13119/CAP_AWS_KYMA/tree/master

Frontend (UI5) : https://github.com/ranjith13119/CAP_AWS_KYMA/tree/fiorikymanew

I attached the xsuaa (tenentMode: dedicated) and destination service to both frontend and backend containers and assigned the user all related roles. I have allow listed all the HTTPS APIs on the xs.security.json.

When I try to consume the SAP CAP API URL (protected with roles) as a destination inside the frontend, I'm getting 401 Unauthorized Error. But, I can successfully consume CAP service without authentication as a destination inside the frontend.

Can you please help me to resolve the issue? Please find the attached images and git repository for reference.

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can find a sample of this scenario at

https://github.com/SAP-samples/teched2021-DEV261/

your issue may be related to the auth setup of the service destintation

https://github.com/SAP-samples/teched2021-DEV261/blob/main/resources/html5/html5-config-secret.yaml

Regards,

Jamie

0 Kudos

Hello Jamie,

Thanks for your comments. As mentioned in the above URL I have updated the service destination and added xsuaa as a secret/Configmap to the backend container by decoding the secrets from the xsuaa-binding-instance on kyma. But I'm still facing the same issue. Getting 401 unauthorized error.

Backend (CAP + HANA) : https://github.com/ranjith13119/CAP_AWS_KYMA/tree/master

Frontend (UI5) : https://github.com/ranjith13119/CAP_AWS_KYMA/tree/fiorikymanew

Answers (0)