Code Monkey home page Code Monkey logo

Comments (5)

PepeluDev avatar PepeluDev commented on July 18, 2024

I am having similar issues. The keystone API that Wilma is calling seems to be deprecated or something...
As an example: I have modified the Request body of the authentication in order to place: config.pep.username password: config.pep.password In the correct way so keyrock can understand it and Wilma is able to authenticate with it.

For this, you have to modify the Wilma code, file: /fiware-pep-proxy/lib/idm.js and add the user and password in the "root" of the json (line 32), like:
var body = { name: config.pep.username, password: config.pep.password };

But after that, when i try to get the info about an user with a pregenerated token (like in Alvaro's video-tutorials), keyrock sends a 401 error to Wilma.
I have been diving into the code and It seems like Wilma is calling a deprecated keyrock API. What i can see in the keyrock log is:

GET /user?access_token=290cc82f-2920-4d7a-aee1-74db13745f0b 401 27.267 ms - 116

And after that, Wilma understands it like it is not really authenticated so it performes again the PEP-proxy authentication and gets a new token:

POST /v3/auth/tokens 201 84.032 ms - 74

This request has no problems and Wilma is able to get the PEP-proxy token again, but as you can see is like a vicious circle.

I Hope my reply helps, but there are still some problems.

from fiware-pep-proxy.

apozohue10 avatar apozohue10 commented on July 18, 2024

Hi,

Thanks for tour reply @PepeluDev. As you have said there was a bug when Wilma authenticate with Keyrock. We have already modified the request to solve this problem.
Then I have tried to get info about user and I think the problem is that you are trying to ge info from an API token and Wilma Pep Proxy only authenticates OAuth 2.0 tokens.

from fiware-pep-proxy.

PepeluDev avatar PepeluDev commented on July 18, 2024

Hi @apozohue10 and thank you for your reply and the code modification :)
I think you are right, the token i have to use (OAuth 2.0 token) and the API one are differents. What is more, i have been checking my keyrock database and the 'oauth_access_token' table is empty for me.
I have been checking the Keyrock documentation but there are a lot of broken links and i cannot access to the full API description. Is there any document or website where i can learn how to generate the OAuth 2.0 tokens from keyrock? Thanks a lot in advance

from fiware-pep-proxy.

apozohue10 avatar apozohue10 commented on July 18, 2024

Hi @PepeluDev, you can find the differents ways of generate an access token here. I hope it helps you.

from fiware-pep-proxy.

dmabtrg avatar dmabtrg commented on July 18, 2024

Hi @apozohue10,

I've just tried the updated version and commit 3241c5c fixes it, so I'm closing the issue.

Thanks,

Regards.

from fiware-pep-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.