Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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.
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
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
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.