Code Monkey home page Code Monkey logo

Comments (6)

apozohue10 avatar apozohue10 commented on July 18, 2024

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.

sickboy93 avatar sickboy93 commented on July 18, 2024

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.

apozohue10 avatar apozohue10 commented on July 18, 2024

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.

sickboy93 avatar sickboy93 commented on July 18, 2024

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.

apozohue10 avatar apozohue10 commented on July 18, 2024

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.

sickboy93 avatar sickboy93 commented on July 18, 2024

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)

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.