2

Im using fiware/idm image from docker and im trying to create new users, but without success. How can i generate Users?

In the docker file from fiware/idm the sync database steps are:

RUN sudo tools/with_venv.sh bin/keystone-manage db_sync && \
    sudo tools/with_venv.sh bin/keystone-manage db_sync --extension=endpoint_filter && \
    sudo tools/with_venv.sh bin/keystone-manage db_sync --extension=oauth2 && \
    sudo tools/with_venv.sh bin/keystone-manage db_sync --extension=roles && \
    sudo tools/with_venv.sh bin/keystone-manage db_sync --extension=user_registration && \
    sudo tools/with_venv.sh bin/keystone-manage db_sync --extension=two_factor_auth

It shouldn't have: sudo tools/with_venv.sh bin/keystone-manage -v db_sync --populate too?

And how keystone know which database to populate?

Container logs when try to create user0:

2017-08-07 09:30:53.374 26 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:30:53] "GET /v3/ HTTP/1.1" 200 484 0.003970
2017-08-07 09:30:53.432 26 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:30:53] "GET /v3/role_assignments?role.id=7f080aaf37b847b8bf1603105bcbee4d&scope.domain.id=default HTTP/1.1" 200 339 0.040451
2017-08-07 09:30:53.469 28 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:30:53] "GET /v3/ HTTP/1.1" 200 484 0.003348
2017-08-07 09:30:53.925 28 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:30:53] "GET /v3/users?name=user0%40teste.com HTTP/1.1" 200 275 0.416366
Singup user user0.
INFO:idm_logger:Singup user user0.
2017-08-07 09:30:53.952 26 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:30:53] "GET /v3/ HTTP/1.1" 200 484 0.004296
2017-08-07 09:31:01.344 26 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:31:01] "POST /v3/OS-REGISTRATION/users HTTP/1.1" 201 517 7.388000
get() takes exactly 1 argument (2 given)
WARNING:idm_logger:get() takes exactly 1 argument (2 given)
[07/Aug/2017 09:31:01] "POST /sign_up/ HTTP/1.1" 302 0
2017-08-07 09:31:01.376 28 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:31:01] "GET /v3/ HTTP/1.1" 200 484 0.003152
2017-08-07 09:31:01.401 28 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [07/Aug/2017 09:31:01] "GET /v3/role_assignments?role.id=7f080aaf37b847b8bf1603105bcbee4d&scope.domain.id=default HTTP/1.1" 200 339 0.020498
[07/Aug/2017 09:31:01] "GET /sign_up/ HTTP/1.1" 200 17135

Thanks

Naff16
  • 83
  • 1
  • 9

1 Answers1

0

You have to create the new user:

In the IdM Horizon login screen, instead of put username, password and click sign in, just click on Sign up link or use idm_ip:8000/sign_up/ directly on your browser. After that, type information about the new user (username, email and password), check the I accept FIWARE... box and click Sign Up button.

Now, out of the container, see the log through:

docker logs <container_name>

There, you will see, in the last lines of the log, the activation link that was supposed to be sent to the new user's email. Copy it, paste on your browser and modify the fiware-lab host on the url specifying your IdM Keyrock address. This way, your new user will be activated through the passed code.

I hope this can help you.

EDIT: the newer versions of Keyrock IdM do not list the activation link in the logs. Here it is: host_address:3000/activate?activation_key=your_activation_key&email=your_email. Change your_activation_key and your_email with your data.

Dalton Cézane
  • 3,672
  • 2
  • 35
  • 60
  • Thanks, but how i create a new user? Making a new user acc in fiware-lab? Using some script? Im sorry for this kind of question, but im not understanding how can i do it. Can you give me a more specific example? Thanks again – Naff16 Jul 14 '17 at 14:19
  • In the IdM Horizon login screen, instead of put username, password and click sign in, just click on `Sign up` link or use `idm_ip:8000/sign_up/` directly on your browser. After that, type information about the new user (username, email and password), check the `I accept FIWARE...` and click `Sign Up` button. Now, follow the previous steps of the answer... – Dalton Cézane Jul 14 '17 at 18:18
  • Hey, @Naff16 . Did you get to create new users? – Dalton Cézane Jul 31 '17 at 13:01
  • Not yet @Daton, i was assingned to another task this days. So i needed to stop this at the moment. Maybe next week i will return to this task. – Naff16 Aug 02 '17 at 11:16
  • I did what you said, but im not understanding the step of the activation link. I posted the logs from the container when i try to create a new user "user0", in the main question. Thanks – Naff16 Aug 07 '17 at 09:42
  • You have to search in the logs some url with `activation_code` or something like this. The part you put in your question does not have the link to activate the user. – Dalton Cézane Aug 07 '17 at 13:44
  • I tried to register another user,but im not finding `activation_code` it appear the same log i posted, and when i finish the operation it appears `Error: Unable to creater user, please try again later`. – Naff16 Aug 07 '17 at 13:56
  • In this case, you have a problem in user creation. If the user is not created, there is no activation code. If you are not able to create a user, maybe you have some problem with your keyrock installation. – Dalton Cézane Aug 07 '17 at 13:58
  • I used this docker image to run the idm: `https://hub.docker.com/r/fiware/idm/`. Did you already used it in some of your projects? – Naff16 Aug 10 '17 at 10:10
  • Yes. I did not have problems with this. Just followed the steps to create a new user... – Dalton Cézane Aug 10 '17 at 14:54
  • Nothing yet, @Naff? – Dalton Cézane Aug 22 '17 at 20:22
  • Nothing yet @Dalton, i need to remove the container and see if i get something new. I will post a new answer when i try all again :) – Naff16 Aug 28 '17 at 09:13
  • Could you please clarify this "There, you will see, in the last lines of the log, the activation link that was supposed to be sent to the new user's email. Copy it, paste on your browser and modify the fiware-lab host on the url specifying your IdM Keyrock address" i got activation key from logs of idm but don't know how use it – ahmad emad May 21 '18 at 10:25
  • @ahmademad , you just need to do what is mentioned: **Copy it, paste on your browser and modify the fiware-lab host on the url specifying your IdM Keyrock address**. In the activation link you receive, you have to change the fiware-lab address to your Keyrock address (IP). Once you did this, you just click this link in the browser in order to activate your user (activation key). Try it and comment here if you have problems. – Dalton Cézane May 21 '18 at 12:44
  • In the loges of idm I don't find activation link so I can't copy it to prosess steps of activation you have mentioned In previous comment and didn't receive any confirmation mail in my mail I have registered in sign up process the only thing I have activation key so I 'm confused what should I do to verify the user – ahmad emad May 21 '18 at 22:32
  • I suggest you open a new question detailing all your steps and what you are getting as message. This way we can try to help you. – Dalton Cézane May 21 '18 at 23:14