Project

General

Profile

Actions

Bug #24301

closed

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

Added by Daniel Lobato Garcia over 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
No
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:

Actions #1

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

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

Actions #3

Updated by Ewoud Kohl van Wijngaarden over 5 years ago

  • Category changed from Users and roles to 218
  • Project changed from Hammer CLI to Foreman
Actions #4

Updated by Anonymous over 5 years ago

  • Fixed in Releases 1.20.0 added
Actions #5

Updated by Daniel Lobato Garcia over 5 years ago

  • Status changed from New to Closed
Actions #6

Updated by Marek Hulán over 5 years ago

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

Updated by Tomer Brisker over 3 years ago

  • Category changed from 218 to Users, Roles and Permissions
Actions

Also available in: Atom PDF