Fiware / IDM创建用户,角色

时间:2017-07-13 15:33:49

标签: fiware fiware-orion keystone

我正在使用来自docker的fiware / idm图像,我试图创建新用户,但没有成功。我如何生成用户?

在来自fiware / idm的docker文件中,同步数据库的步骤是:

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

它也不应该:sudo tools/with_venv.sh bin/keystone-manage -v db_sync --populate

keystone如何知道要填充哪个数据库?

尝试创建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

由于

1 个答案:

答案 0 :(得分:0)

您必须创建新用户:

在IdM Horizo​​n登录屏幕中,您只需点击Sign up链接或直接在浏览器上使用idm_ip:8000/sign_up/,而无需输入用户名,密码和点击登录。之后,键入有关新用户的信息(usernameemailpassword),选中I accept FIWARE...框并点击Sign Up按钮。

现在,在容器外面,请参阅日志:

docker logs <container_name>

在那里,您将在日志的最后几行看到应该发送给新用户电子邮件的激活链接。复制它,粘贴到您的浏览器上并修改网址上的fiware-lab主机,指定您的IdM Keyrock地址。这样,您的新用户将通过传递的代码激活。

我希望这可以帮到你。