Bug #24301
closedCreating user with hammer having authentication source LDAP/AD should not ask for password
Description
Description of problem:
When creating a user on Foreman with hammer having external authentication source LDAP/AD gives an error if password not mentioned while the user gets added if password parameter is mentioned. As the user created will be authenticated with the authentication source password and not by the password provided by us while creating user, iit should not be mandatory to create user with password parameter.
How reproducible: Always
Steps to Reproduce:Create user without password parameter:
- hammer user create --auth-source-id 3 --firstname Tom --lastname Mathew --login tom123 --mail 'tom@example.com' --roles 'Access Insights Viewer,Customized Viewer,Red Hat Access Logs,Tasks Reader,View hosts'
Could not create the user:
Missing arguments for 'user[password]'2) Create user with password parameter:- hammer user create --auth-source-id 3 --firstname Tom --lastname Mathew --login tom123 --mail 'tom@example.com' --roles 'Access Insights Viewer,Customized Viewer,Red Hat Access Logs,Tasks Reader,View hosts' --password "redhat"
User [cmn01] created
- hammer user create --auth-source-id 3 --firstname Tom --lastname Mathew --login tom123 --mail 'tom@example.com' --roles 'Access Insights Viewer,Customized Viewer,Red Hat Access Logs,Tasks Reader,View hosts' --password "redhat"
- hammer user list
---|---------------|------------------|------------------------|-------|---------------------|--------------
ID | LOGIN | NAME | EMAIL | ADMIN | LAST LOGIN | AUTHORIZED BY
---|---------------|------------------|------------------------|-------|---------------------|--------------
7 | tom123 |Tom Mathew | tom@example.com | yes | 2018/02/20 15:21:56 | adserver
Actual results:
User is not allowed to create without password parameter even when we have specified the external auth source.
Expected results:
When the user is authenticated with the external authentication source LDAP/AD then while creating a user via hammer the --password parameter should be optional.
Additional info:
Updated by Tomáš Strachota over 6 years ago
- Subject changed from Creating user with hammer having authentication source LDAP/AD should not ask for password to Creating user with hammer having authentication source LDAP/AD should not ask for password
- Category set to Users and roles
Updated by Tomáš Strachota over 6 years ago
This has to be fixed in the API where the parameter 'password' is required in apidoc and therefore apipie-bindings raise exception when hammer doesn't send it.
Updated by Ewoud Kohl van Wijngaarden over 6 years ago
- Category changed from Users and roles to 218
- Project changed from Hammer CLI to Foreman
Updated by Daniel Lobato Garcia over 6 years ago
- Status changed from New to Closed
Applied in changeset 01d1fedc7c5da8722ae7ce4420721d507d357924.
Updated by Marek Hulán over 6 years ago
- Pull request https://github.com/theforeman/foreman/pull/6005 added
Updated by Tomer Brisker over 4 years ago
- Category changed from 218 to Users, Roles and Permissions