cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Authentication kind "jwt" configured, but no XSUAA instance bound

somnath
Active Participant
0 Kudos
1,988

Hello,

I was simply trying to deploy sample cap project to BTP CF (Trial) but every time it failed with deployment, with the following reason: Error: Authentication kind "jwt" configured, but no XSUAA instance bound to

I can see the error comes all the way from node_modules/@sap/cds/lib/auth/jwt-auth.js.

The project I created from template with minimal option I chose, and I didn't want to attach any security to my app. This works fine while testing locally but deploying it to BTP ending up with the above error.

Tried with some earlier versions of @Sap/cds but no luck. Is this a known error?

Can someone kindly confirm? or may I am missing some basics!

- Thanks, Somnath

 

View Entire Topic
Dinu
Contributor
0 Kudos

Not this is not a bug. This is the documented behavior. See authentication is enforced in production

You may explicitly enable mocked strategy in production by adding the following to file .cdsrc.json 

{
        "requires": {
                "auth": "mocked"
        }
}

 

sreeviswa_01
Newcomer
0 Kudos

Hi Dinu,

I have given the above into my .cdsrc.json, but still I'm getting the same error while executing the program

Error: Authentication kind "xsuaa" configured, but no XSUAA instance bound to application. Either bind an IAS instance, or switch to an authentication kind that does not require a binding.

at jwt_auth (/home/user/projects/MyHANAApp/node_modules/@sap/cds/lib/auth/jwt-auth.js:17:11) at auth_factory (/home/user/projects/MyHANAApp/node_modules/@sap/cds/lib/auth/index.js:46:61) at _instantiate (/home/user/projects/MyHANAApp/node_modules/@sap/cds/lib/srv/middlewares/index.js:49:12) at /home/user/projects/MyHANAApp/node_modules/@sap/cds/lib/srv/middlewares/index.js:13:13 at Array.map (<anonymous>) at Object.<anonymous> (/home/user/projects/MyHANAApp/node_modules/@sap/cds/lib/srv/middlewares/index.js:13:3) at Module._compile (/home/user/projects/MyHANAApp/lib/internal/modules/cjs/loader.js:1369:14) at Module._extensions..js (/home/user/projects/MyHANAApp/lib/internal/modules/cjs/loader.js:1427:10) at Module.load (/home/user/projects/MyHANAApp/lib/internal/modules/cjs/loader.js:1206:32) at Module._load (node:internal/modules/cjs/loader:1022:12) {stack: 'Error: Authentication kind "xsuaa" configured…ad (node:internal/modules/cjs/loader:1022:12)', message: 'Authentication kind "xsuaa" configured, but …cation kind that does not require a binding.'}

cds.js:75
 
And in the problem i could see  below two error any idea , please help me out here ,
 
8211539 Could not find a configured library that contains the "com.sap.hana.di.afllangprocedure" build plugin
8211539 Could not find a configured library that contains the "com.sap.hana.di.virtualfunctionpackage.hadoop" build plugin
sapdev
Discoverer
0 Kudos
Hi, I was following a SAP Tutorial, and found same error, I just changed the authenticate property in the file "package.json", under "cds", you will need to change the value "xsuaa" to "mocked", hope it works, it did it for me.