Comments (5)
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.
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.
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.
Hi @PepeluDev, you can find the differents ways of generate an access token here. I hope it helps you.
from fiware-pep-proxy.
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)
- protect orion HOT 1
- doubt about pep proxy HOT 1
- HTTPS port not working in v7.9 HOT 1
- Access token expired
- harmonize Environment variable
- Docker Tag 8.2.0 missing on dockerhub (for idm as well) HOT 2
- Authorization Headers and Cache
- Docker versions of 8.1.0 and 8.3.0 return wrong mime type text/html since last image version HOT 3
- Docker healthcheck fails in 8.3.0 HOT 1
- Integration problem between Keyrock, fiware-pep-proxy and orion-ld HOT 2
- InvalidAuthenticationToken while trying to access Orion-LD HOT 1
- Metrics of usage
- WILMA delete NGSILD-Results-Count in response header HOT 1
- Why there is `trusted_apps` setting in pep-proxy HOT 1
- Moving from Docker Hub image tag 7.0.2 to 7.4.0 or later with Docker Compose causes "TypeError: Cannot read property 'secret' of undefined" HOT 2
- Use toBoolean with PEP_PROXY_ORG_ENABLED HOT 1
- PEP crashes when authenticating with IoT sensor HOT 1
- Cannot read property 'split' of undefined when trying to run application HOT 1
- Missing Fiware-Service Header in Allowed Auth Header on CORS Preflight request HOT 1
- Running docker container as non-root user HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fiware-pep-proxy.