Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6427

FIWARE.Question.Tech.Security.IDM-KeyRock.Fiware keystone api create user and access with horizon

    Details

      Description

      Created question in FIWARE Q/A platform on 20-04-2016 at 10:04
      Please, ANSWER this question AT http://stackoverflow.com/questions/36737454/fiware-keystone-api-create-user-and-access-with-horizon

      Question:
      Fiware keystone api create user and access with horizon

      Description:
      im using keystone api to create an user (as in Fiware Keystone API Create User).

      my steps:

      create project with:

      curl -s -H "X-Auth-Token:17007fe11124bd71eb60" -H "Content-Type:
      application/json" -d '{"tenant": {"description":"Project1",
      "name":"proyecto1", "enabled": true}}'
      http://localhost:35357/v2.0/tenants -X POST | python
      -mjson.tool

      create role:

      curl -s -H "X-Auth-Token:17007fe11124bd71eb60" -H "Content-Type:
      application/json" -d '{"role":{"name":"Project1Admin",
      "description":"Role Admin for project1"}}'
      http://localhost:35357/v3/roles | python -mjson.tool

      Create user:

      curl -s -H "X-Auth-Token:17007fe11124bd71eb60" -H "Content-Type:
      application/json" -d '{"user": {"default_project_id":
      "d0f384973b9f4a57b975fcd9bef10c6e", "description":"admin1",
      "enabled":true, "name":"admin", "password":"admin",
      "email":"admin@gmail.com"}}' http://localhost:35357/v2.0/users |
      python -mjson.tool

      last step: create user-role-tenant relationship:

      curl -s -H "X-Auth-Token:17007fe11124bd71eb60"
      http://localhost:35357/v2.0/tenants/d0f384973b9f4a57b975fcd9bef10c6e/users/admin1/roles/OS-KS/0c10f475076345368724a03ccd1c3403
      -X PUT

      if i check user:

      curl -s -H "X-Auth-Token:17007fe11124bd71eb60" http://localhost:5000/v3/users/admin1 | python -mjson.tool

      response:

      {
      "user": {
      "default_project_id": "d0f384973b9f4a57b975fcd9bef10c6e",
      "description": "admin1",
      "domain_id": "default",
      "email": "admin1@gmail.com",
      "enabled": true,
      "id": "admin1",
      "links":

      { "self": "http://localhost:5000/v3/users/admin1" }

      ,
      "name": "admin1",
      "username": null
      }
      }

      I think thats good, But I try to connect with horizon and have an error "Invalid user or password". The result im getting in logs is the following :

      keystone.log

      2016-04-20 07:56:03.949 2150 WARNING keystone.common.wsgi [-] Could not find user: admin1@gmail.com
      2016-04-20 07:56:03.967 2150 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [20/Apr/2016 07:56:03] "HEAD /v3/OS-TWO-FACTOR/two_factor_auth?user_name=admin1%40gmail.com&domain_name=Default HTTP/1.1" 404 159 0.077033

      horizon.log:

      [Wed Apr 20 07:59:41.934935 2016] [:error] [pid 5963:tid
      140154061260544] Login failed for user "admin1@gmail.com".

      Anyone knows why this user cant connect with horizon?

      thanks

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        5d 2h 54m 1 Alvaro Alonso 25/Apr/16 2:56 PM
        In Progress In Progress Answered Answered
        1s 1 Alvaro Alonso 25/Apr/16 2:57 PM
        Answered Answered Closed Closed
        1s 1 Alvaro Alonso 25/Apr/16 2:57 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] Fiware keystone api create user and access with horizon FIWARE.Question.Tech.Security.IDM-KeyRock.Fiware keystone api create user and access with horizon
        HD-Node Unknown [ 10852 ]
        aalonsog Alvaro Alonso made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        aalonsog Alvaro Alonso made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        aalonsog Alvaro Alonso made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Assignee Alvaro Alonso [ aalonsog ]
        backlogmanager Backlog Manager made changes -
        HD-Chapter Unknown [ 10845 ] Security [ 10841 ]
        mev Manuel Escriche made changes -
        HD-Enabler Unknown [ 10910 ] KeyRock [ 10889 ]
        backlogmanager Backlog Manager made changes -
        HD-Enabler Unknown [ 10910 ]
        HD-Chapter Unknown [ 10845 ]
        HD-Node Unknown [ 10852 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-04-20 12:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-04-20 12:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            aalonsog Alvaro Alonso
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: