fiware-pep-proxy icon indicating copy to clipboard operation
fiware-pep-proxy copied to clipboard

Integration problem between Keyrock, fiware-pep-proxy and orion-ld

Open juanantonio-ayto opened this issue 1 year ago • 2 comments

After correctly configuring both keyrock and pep-proxy. Registering the application, users, permissions, etc. I performed the normal steps of obtaining the oauth2 token and then using it to make queries to the Context Broker. However, although it received a positive authorization from the Keyrock, it got a negative decision from the fiware-pep-proxy.

Analyzing the problem in the keyrock log I got the following: GET /user?access_token=b7d76f3bd48fdb9aa66679e77ddc8af26084cac2&app_id=2f3389f7-4893-4874-9825-bf816ff37329&action=GET&resource=/ngsi-ld/v1/entities/ 201 26,373 ms - 386.

However, from the pep-proxy side I received a: User access-token not authorized urn:dx:as:InvalidRole

It seems that the failure is in dealing with a decision by the Keyrock with empty body.

Line 60 of the lib/access_functions.js file exports.adjudicate = function (req, res, decision) { console.log("Decision: " +decision); if (decision) { //<--- Here would be the problem permit(req, res); } else { deny(res, 'User access-token not authorized', 'urn:dx:as:InvalidRole'); } };

juanantonio-ayto avatar Mar 20 '23 13:03 juanantonio-ayto

is this even maintained anymore?

MarkusPfundstein avatar Jul 16 '23 19:07 MarkusPfundstein

Hello, what are you getting in the log console.log("Decision: " +decision) ?

aalonsog avatar Jul 17 '23 09:07 aalonsog