Feature #18805

Creating external user-group does not have any option --auth-source as a input parameter.

Added by Tomáš Strachota 10 months ago. Updated 6 days ago.

Status:New
Priority:Normal
Assigned To:Daniel Lobato Garcia
Category:Users and roles
Target version:Foreman - Team Marek Iteration 25
Difficulty: Bugzilla link:1417015
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1417015

Description of problem:

In Hammer CLI, when we create external user-group, the only input parameter
available is --auth-source-id. No option available with --auth-source as a parameter.

#hammer user-group external create --help
Usage:
    hammer user-group external create [OPTIONS]

Options:
 --auth-source-id AUTH_SOURCE_ID ID of linked authentication source
 --name NAME                     External user group name
 --user-group USER_GROUP_NAME    Name to search by
 --user-group-id USER_GROUP_ID    
 -h, --help                      print help

Version-Release number of selected component (if applicable):
foreman 1.14
hammer-cli-foreman 0.8.0

How reproducible:

# hammer auth-source ldap list                                   
---|----------|--------|------|---------------
ID | NAME     | LDAPS? | PORT | SERVER TYPE   
---|----------|--------|------|---------------
3  | AD-AUTH  |        | 389  | AuthSourceLdap
5  | IPA-AUTH |        | 389  | AuthSourceLdap
7  | rhel-idm |        | 389  | AuthSourceLdap
---|----------|--------|------|---------------

# hammer user-group  list 
---|---------
ID | NAME    
---|---------
4  | onlyview
---|---------

# hammer user-group  external list --user-group onlyview
---|-------------|------------
ID | NAME        | AUTH SOURCE
---|-------------|------------
2  | view-access | rhel-idm   
---|-------------|------------

# hammer user-group external create --auth-source-id 7 --name view-access-1 --user-group onlyview
External user group created
# 

# hammer user-group  external list --user-group onlyview
---|---------------|------------
ID | NAME          | AUTH SOURCE
---|---------------|------------
2  | view-access   | rhel-idm   
3  | view-access-1 | rhel-idm   
---|---------------|------------

# hammer user-group external create --help
Options:
 --auth-source-id AUTH_SOURCE_ID ID of linked authentication source
 --name NAME                     External user group name
 --user-group USER_GROUP_NAME    Name to search by
 --user-group-id USER_GROUP_ID    
 -h, --help                      print help

From the above we can see there is only one option to create external user-group i.e. --auth-source-id.

No option available with --auth-source-name or --auth-source as a input parameter.

Expected results:
auth-source-name or auth-source must be available as a input parameter.

Additional info:
This makes scripting the creation of external user-groups difficult as you must first parse the auth source list to find the id.


Related issues

Related to Hammer CLI - Feature #4356: Improve ways of passing auth source when creating a user New 02/17/2014
Blocked by Foreman - Feature #18584: Api for listing all auth sources Duplicate 02/21/2017
Blocked by Foreman - Bug #15286: Missing API for external auth sources Ready For Testing 06/03/2016

History

#1 Updated by Tomáš Strachota 10 months ago

  • Related to Feature #4356: Improve ways of passing auth source when creating a user added

#2 Updated by Tomáš Strachota 10 months ago

#3 Updated by Tomáš Strachota 10 months ago

  • Subject changed from Creating external user-group does not have any option --auth-source as a input parameter. to Creating external user-group does not have any option --auth-source as a input parameter.
  • Category set to Users and roles
  • Target version set to Team Marek backlog

#4 Updated by Marek Hulán 7 months ago

  • Target version changed from Team Marek backlog to Team Marek Iteration 15

#5 Updated by Marek Hulán 6 months ago

  • Target version changed from Team Marek Iteration 15 to Team Marek Iteration 16

#6 Updated by Marek Hulán 6 months ago

  • Target version changed from Team Marek Iteration 16 to Team Marek Iteration 17

#7 Updated by Dominik Hlavac Duran 5 months ago

  • Blocked by Bug #15286: Missing API for external auth sources added

#8 Updated by Marek Hulán 5 months ago

  • Target version changed from Team Marek Iteration 17 to Team Marek Iteration 18

#9 Updated by Marek Hulán 4 months ago

  • Target version changed from Team Marek Iteration 18 to Team Marek Iteration 19

#10 Updated by Marek Hulán 4 months ago

  • Target version changed from Team Marek Iteration 19 to Team Marek Iteration 20

#11 Updated by Marek Hulán 3 months ago

  • Target version changed from Team Marek Iteration 20 to Foreman - Team Marek Iteration 21

#12 Updated by Marek Hulán about 1 month ago

  • Target version changed from Foreman - Team Marek Iteration 21 to Foreman - Team Marek Iteration 22

#13 Updated by Marek Hulán about 1 month ago

  • Target version changed from Foreman - Team Marek Iteration 22 to Foreman - Team Marek Iteration 23

#14 Updated by Marek Hulán 27 days ago

  • Target version changed from Foreman - Team Marek Iteration 23 to Foreman - Team Marek Iteration 24

#15 Updated by Marek Hulán 6 days ago

  • Target version changed from Foreman - Team Marek Iteration 24 to Team Marek Iteration 25

Also available in: Atom PDF