cancel
Showing results for 
Search instead for 
Did you mean: 

Enable/disable the security settings of my App. in SAP Business Application Studio

iperez-sofos
Participant
0 Kudos

Greetings.

I am working on an application based on SAP CAP (NodeJS SDK) and SAP HANA Database on the SAP BTP environment (Trial Account).

To do the security configuration and deployment to the Cloud Foundry environment I have followed the following tutorial by Thomas Jung:

https://developers.sap.com/tutorials/hana-cloud-cap-add-authentication.html

https://developers.sap.com/tutorials/hana-cloud-cap-deploy-mta.html

I found it excellent, and beyond some problems (already solved) to do the deployment, everything has turned out well.

Now the situation is as follows: Although I needed to be able to deploy an intermediate version of my application to Cloud Foundry, while I continue developing in SAP BAS I find it uncomfortable to have all the security settings enabled all the time (especially to do manual tests with the .http files).

So my question is: Is there an easy and convenient way to enable/disable my application security settings while in SAP BAS?

Currently, while I am developing in SAP BAS, to disable security I have to comment on all the lines

@(requires:'authenticated-user')

in all CDS service definition files (there are more than ten files). Otherwise, I get a 401 (Unauthorized) error code in every request for my .http test files.

Thanks in advance for any help and/or suggestions.

Accepted Solutions (0)

Answers (1)

Answers (1)

mariusobert
Developer Advocate
Developer Advocate
0 Kudos

You can work around this when you organize your project differently. You could use the mock/dummy authentication in your development step-up only.

E.g.you could have a cdsrc or a package.json that you only use for local development and one that you use for deployment to SAP BTP (the latter one will depend on xsuaa).