Project

General

Profile

Bug #24301

Creating user with hammer having authentication source LDAP/AD should not ask for password

Added by Daniel Lobato Garcia 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Users
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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:
  1. hammer user create --auth-source-id 3 --firstname Tom --lastname Mathew --login tom123 --mail '' --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:
    1. hammer user create --auth-source-id 3 --firstname Tom --lastname Mathew --login tom123 --mail '' --roles 'Access Insights Viewer,Customized Viewer,Red Hat Access Logs,Tasks Reader,View hosts' --password "redhat"
      User [cmn01] created
  1. hammer user list
    ---|---------------|------------------|------------------------|-------|---------------------|--------------
    ID | LOGIN | NAME | EMAIL | ADMIN | LAST LOGIN | AUTHORIZED BY
    ---|---------------|------------------|------------------------|-------|---------------------|--------------
    7 | tom123 |Tom Mathew | | 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:

Associated revisions

Revision 01d1fedc (diff)
Added by Daniel Lobato Garcia 4 months ago

Fixes #24301 - Create user in LDAP does not require password

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, it
should not be mandatory to create user with password parameter.

History

#1 Updated by Tomáš Strachota 5 months ago

  • Category set to Users and roles
  • 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

#2 Updated by Tomáš Strachota 5 months 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.

#3 Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Category changed from Users and roles to Users
  • Project changed from Hammer CLI to Foreman

#4 Updated by Michael Moll 4 months ago

  • Fixed in Releases 1.20.0 added

#5 Updated by Daniel Lobato Garcia 4 months ago

  • Status changed from New to Closed

#6 Updated by Marek Hulán 3 months ago

  • Pull request https://github.com/theforeman/foreman/pull/6005 added

Also available in: Atom PDF