Bug 1911338

Summary: The "hammer auth-source ldap update" command's "--host" argument does not have an appropriate explanation for it
Product: Red Hat Satellite Reporter: Kaushik Sajjan Agarwal <kagarwal>
Component: APIAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Omkar Khatavkar <okhatavk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8.0CC: apatel, egolov, ehelms, kgaikwad, ofedoren, rabajaj, vijsingh
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: foreman-2.5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:09:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kaushik Sajjan Agarwal 2020-12-28 18:31:40 UTC
Description of problem:

The "hammer auth-source ldap update" command's "--host" argument does not have an appropriate explanation for it. It is used to update the "server" value in the auth-source configuration which causes confusion.

Version-Release number of selected component (if applicable):

Satellite 6.6, 6.7, and 6.8.

How reproducible:

Always.

Steps to Reproduce:

1. Create any auth-source configuration in Red Hat Satellite.
2. List the auth-source using hammer command: # hammer auth-source ldap info --name <auth-source_config_name>
3. Now to change the "Server" parameter for the auth-source configuration you will have to use following command:

   # hammer auth-source ldap update --name <auth-source_config_name> --host <new_server_name>


Actual results:

 The "Server" for the desired auth-source configuration can be changed using the "--host" argument.

 And there is no explanation for the "--host" argument stating it's usage:

---
[root@sat1 ~]# hammer auth-source ldap update --help
Usage:
    hammer auth-source ldap update [OPTIONS]

Options:
 --account ACCOUNT                          
 --account-password ACCOUNT_PASSWORD       Required if onthefly_register is true
 --attr-firstname ATTR_FIRSTNAME           Required if onthefly_register is true
 --attr-lastname ATTR_LASTNAME             Required if onthefly_register is true
 --attr-login ATTR_LOGIN                   Required if onthefly_register is true
 --attr-mail ATTR_MAIL                     Required if onthefly_register is true
 --attr-photo ATTR_PHOTO                    
 --base-dn BASE_DN                          
 --groups-base GROUPS_BASE                 Groups base DN
 --host HOST                                
 --id ID                                    
 --ldap-filter LDAP_FILTER                 LDAP filter
---

Expected results:

 Either there should be an explanation for the "--host" argument stating that its usage is to modify the "Server" parameter in the desired auth-source config file or the "--host" argument should be replaced by the "--server" argument which is identical to the "Server" filed and easy to understand/interpret.

Additional info:

Comment 2 Oleh Fedorenko 2021-01-08 13:45:45 UTC
The host option with its description (or its absence) comes from the API, thus changing the component.

Comment 3 Oleh Fedorenko 2021-01-08 13:47:52 UTC
Created redmine issue https://projects.theforeman.org/issues/31597 from this bug

Comment 4 Bryan Kearney 2021-03-09 12:05:01 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31597 has been resolved.

Comment 6 Omkar Khatavkar 2021-06-10 16:47:22 UTC
Verified in Satellite 6.10 with snap 3, added the description for the host  

[root@dhcp-3-26 ~]# hammer auth-source ldap update --help | grep host
 --host HOST                               The hostname of the LDAP server

Comment 9 errata-xmlrpc 2021-11-16 14:09:38 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 (Moderate: Satellite 6.10 Release), 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-2021:4702