Comments (6)
Hi sickboy93,
To solve that problem, you need to create an application through the idm portal and then register a PEP Proxy in that application. You will obtain the username and password parameters which are the ones that you have to configure in the Wilma Pep Proxy.
You can find more information of how to do that here: https://edu.fiware.org/course/view.php?id=131
from fiware-pep-proxy.
For now I didn't configured horizon (I've got some issue because I have all these VM in Openstack), so I'm using Keystone API.
I created an application(consumer, is that right?)
curl --include \ --request POST \ --header "Content-Type: application/json" \ --header "X-Auth-token: coritel" \ --data-binary "{ \"consumer\": { \"name\": \"test_app\", \"description\": \"my test app\", \"client_type\": \"confidential\", \"redirect_uris\": [ \"http://localhost/login\" ], \"grant_type\": \"authorization_code\", \"scopes\": [ \"all_info\" ] } }" \ 'http://localhost:5000/v3/OS-OAUTH2/consumers'
How can I register the PEP proxy now?
from fiware-pep-proxy.
I see. So for the user you have already created you need to assign the role pep_proxy to the user. To do that you need to obtain the id of the pep_proxy role from the list of roles:
curl --include --header "X-Auth-token: YOUR_TOKEN" 'http://172.18.0.6:5000/v3/roles'
And use the id to assign the role to the user:
curl --include --request PUT --header "X-Auth-token: YOUR_TOKEN" 'http://172.18.0.6:5000/v3/domains/default/users/USER_ID/roles/PEP_PROXY_ROLE_ID'
This should work
from fiware-pep-proxy.
I don't have pep_proxy role:
{ "links": { "next": null, "previous": null, "self": "http://localhost:5000/v3/roles" }, "roles": [ { "id": "3bfb3210ef42432ca975cd6f842426de", "links": { "self": "http://localhost:5000/v3/roles/3bfb3210ef42432ca975cd6f842426de" }, "name": "member" }, { "id": "ca4b75557f1940bd99ef53e280d68db0", "links": { "self": "http://localhost:5000/v3/roles/ca4b75557f1940bd99ef53e280d68db0" }, "name": "owner" }, { "id": "857a5c2a3fec4eb188fddbf155068ebf", "is_default": true, "links": { "self": "http://localhost:5000/v3/roles/857a5c2a3fec4eb188fddbf155068ebf" }, "name": "trial" }, { "id": "80a660f2932543cb874b1a3e91fd7ffe", "is_default": true, "links": { "self": "http://localhost:5000/v3/roles/80a660f2932543cb874b1a3e91fd7ffe" }, "name": "basic" }, { "id": "9e76adc381d549d0b70be593eb06a8bc", "is_default": true, "links": { "self": "http://localhost:5000/v3/roles/9e76adc381d549d0b70be593eb06a8bc" }, "name": "community" }, { "id": "faa1a525ea734389b72a35c80cd046a4", "is_default": true, "links": { "self": "http://localhost:5000/v3/roles/faa1a525ea734389b72a35c80cd046a4" }, "name": "admin" } ] }
I tried to create it
curl localhost:5000/v3/roles -H "X-Auth-Token: coritel" \ -d @- <<EOF { "role": { "domain_id": "default", "name": "pep_proxy" } } EOF
But
{"error": {"message": "create_role() got an unexpected keyword argument 'token_request'", "code": 400, "title": "Bad Request"}}
I tried it even with a generated token and without that. If I don't put the header I have
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
from fiware-pep-proxy.
There is another way, you can create directly on the database. Install sqlite3 and run this sql statments:
Create pep_proxy role:
insert into role (id, name, extra) values ('pep_proxy', 'pep_proxy', '{"is_default": "true"}');
Create assignment between role and user:
insert into assignment (type, actor_id, target_id, role_id, inherited) values ('GroupDomain', 'USER_ID', 'default', 'pep_proxy', 0);
This should do the trick.
from fiware-pep-proxy.
All right it works, be careful that the user must have admin and pep_proxy roles, then you have to generate the token and finally start PEP.
Thank you for your help @apozohue10 !
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
- Testing Proxy as per readme.md gives an unexpected response
- 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.