cancel
Showing results for 
Search instead for 
Did you mean: 

XSUAA Error in XSJS Module in XSA Cloud Foundry

umberto_panico
Participant
0 Kudos

Hi All,
I'm not able to solve this problem:
In Foundry environment I've created a XSODATA services with XSUAA as auth mode.
When comment "anonymous: true" in server.js then service not works:

Error: No UAA configuration is provided in non-anonymous mode.

XSUAA run in cockpit (with correct bind) and routing exist in xs-app.json in WEB module.

Please help.

Hana 2.0 SPS04

UPDATE:
UAA service was binded also WEB module. Remove the resource from MTA file there is another error:

Server listening on port 53988
Container became healthy
{ data: 'Failed login attempt',
  user: 'UNKNOWN',
I'm try to access directly to xsodata.


Thanks.

Accepted Solutions (0)

Answers (6)

Answers (6)

fulvioval
Explorer
0 Kudos

umberto.panico.81 can you share your solution? I'm having similar issue here. Thanks!

nileshpuranik
Explorer
0 Kudos

Hi Umberto,

Can you please share the solution. I am also in exact same situation and my requirement is also exactly like yours.Db, NodeJs, xsodata , No html / UImodule but consume xsodata in SAPUI5 App.

Br

Nilesh

miltonbispo
Discoverer
0 Kudos

Hello everyone,

Could anyone, please, share the solution to this question?

Thank you.

umberto_panico
Participant
0 Kudos

solve boy myself. Amazing. Documentation is wrong .

jomesili-2
Discoverer
0 Kudos

Can you share how you solved the problem for other to take cue from ?

umberto_panico
Participant
0 Kudos

Short:

I've create a CAP application with db, srv, xsjs/xsodata and web modules(crud) and xsuaa service in Foundry environment.

Configure Xs-app.json (routing), xs-security and remove authentication from server.js.

Web module works fine, but I need to expose xsodata because a Neo app will consume it (read only).

Maybe I should use a different solution.

Steven_UM
Contributor
0 Kudos

Hi,

I assume you mean that you get the error 'No UAA configuration is provided in non-anonymous mode.' when you set 'anonymous' to 'false' ( and not 'true' as you mentionned ).

You didn't mention anything about your 'server.js' code so just to be sure - are you actually passing along the UAA configuration ?

// configure UAA
try {
options = Object.assign(options, xsenv.getServices({ uaa: {tag: "xsuaa"} }));
} catch (err) {
console.log("[WARN]", err.message);
} 

// start server
xsjs(options).listen(port);
umberto_panico
Participant
0 Kudos

Ciao Steve,

Yes, the cose is the same. 😞


Thanks.

Umberto