Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1417015 - [RFE] From hammer cli, creating external user-group does not have any option --auth-source-name as a input parameter.
Summary: [RFE] From hammer cli, creating external user-group does not have any option ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: LDAP
Version: 6.2.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.4.0
Assignee: Dominik Hlavac Duran
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On:
Blocks: 260381
TreeView+ depends on / blocked
 
Reported: 2017-01-27 00:55 UTC by Amit Kumar Das
Modified: 2021-12-10 15:17 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 15:27:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18805 0 Normal Duplicate Creating external user-group does not have any option --auth-source as a input parameter. 2021-01-28 11:22:17 UTC
Red Hat Bugzilla 1336236 0 medium CLOSED hammer can't create external groups based on IPA/IdM integration 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker SAT-6949 0 None None None 2021-12-10 15:17:03 UTC
Red Hat Product Errata RHSA-2018:2927 0 None None None 2018-10-16 15:28:17 UTC

Internal Links: 1336236

Description Amit Kumar Das 2017-01-27 00:55:35 UTC
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-name 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):
# rpm -qa|grep -i satellite
satellite-6.2.6-2.0.el7sat.noarch
# hammer --version
hammer (0.5.1.11)

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.

Comment 5 Tomas Strachota 2017-03-06 13:42:45 UTC
Created redmine issue http://projects.theforeman.org/issues/18805 from this bug

Comment 9 Satellite Program 2018-02-26 11:08:14 UTC
Upstream bug assigned to dhlavacd

Comment 11 Sanket Jagtap 2018-09-21 13:08:38 UTC
Build:Satellite 6.4.0 snap22

hammer> user-group external create --name foobargroup --user-group-id 1 --auth-source IDM
External user group created.
hammer> user-group external list --user-group foobargroup
---|-------------|------------
ID | NAME        | AUTH SOURCE
---|-------------|------------
2  | foobargroup | IDM        
---|-------------|------------
hammer> auth-source list 
---|----------|--------------------
ID | NAME     | TYPE OF AUTH SOURCE
---|----------|--------------------
1  | Internal | AuthSourceInternal 
3  | IDM      | AuthSourceLdap     
---|----------|--------------------

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

Options:
 --auth-source AUTH_SOURCE_NAME          Name to search by
 --auth-source-id AUTH_SOURCE_ID          
 --location LOCATION_NAME                Location name
 --location-id LOCATION_ID                
 --location-title LOCATION_TITLE         Location title
 --name NAME                             External user group name
 --organization ORGANIZATION_NAME        Organization name
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-title ORGANIZATION_TITLE Organization title
 --user-group USER_GROUP_NAME            Name to search by
 --user-group-id USER_GROUP_ID            
 -h, --help                              Print help

Comment 13 errata-xmlrpc 2018-10-16 15:27:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927


Note You need to log in before you can comment on or make changes to this bug.