Bug 1448179 - Hammer auth-source didn't list all sources
Summary: Hammer auth-source didn't list all sources
Status: CLOSED DUPLICATE of bug 1336236
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.8
Hardware: All
OS: All
Target Milestone: Unspecified
Assignee: Dominik Hlavac Duran
QA Contact: Katello QA List
Depends On:
TreeView+ depends on / blocked
Reported: 2017-05-04 17:30 UTC by Waldirio M Pinheiro
Modified: 2020-06-11 13:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-07-02 13:53:36 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18584 0 Normal Duplicate Api for listing all auth sources 2020-08-05 16:46:42 UTC
Foreman Issue Tracker 19651 0 Normal Closed Command for listing all auth sources 2020-08-05 16:46:42 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

Internal Links: 1336236

Description Waldirio M Pinheiro 2017-05-04 17:30:54 UTC
Description of problem:
Customer would like to see all sources instead only the ldap source via hammer command

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

How reproducible:

Steps to Reproduce:
1. via cli type *hammer auth-source ldap list*
2. Via cli and as postgre user type *psql -d foreman -c "select id,name,type from auth_sources;"*

Actual results:
Are different

Expected results:
Should be the same or at least just add one option in hammer like below to show all sources
*hammer auth-source "all" list*

Additional info:

Comment 1 Waldirio M Pinheiro 2017-05-04 17:31:37 UTC
Below one example

// Query from hammer
# hammer -p redhat auth-source ldap list
3  | w2k8 |        | 389  | AuthSourceLdap

// Query from db
$ psql -d foreman -c "select id,name,type from auth_sources;"
 id |   name   |        type        
  1 | Internal | AuthSourceInternal
  2 | Hidden   | AuthSourceHidden
  3 | w2k8     | AuthSourceLdap
(3 rows)

Comment 2 Marek Hulan 2017-05-05 06:15:34 UTC
Hello Waldirio. Could you please explain, why customer would want to see these?

The hammer command reflects what's displayed in UI. AuthSourceHidden is obviously hidden from users and is used for internal purpose (it's used by internal anonymous admin user). AuthSourceInternal is auth source for users which password is stored in internal DB, there's nothing to configure for it, therefore it's also hidden. The only legitimate auth source type that should be displayed except for LDAP auth source is external auth source, which is only created when user configures it using the installer. It's normally used only if users want to use kerberos/IPA authentication. This is already tracked as BZ 1336236.

Comment 3 Waldirio M Pinheiro 2017-05-05 22:15:06 UTC
Hi Marek, good afternoon

I saw one ExternalSource and I asked customer what procedure / steps was used to create that one once he would like to see via hammer command.

When customer send me the reply I'll update the BZ

Thank you!!

Comment 10 Satellite Program 2017-07-10 10:04:35 UTC
Upstream bug assigned to dhlavacd

Comment 11 Satellite Program 2017-07-10 10:04:39 UTC
Upstream bug assigned to dhlavacd

Comment 13 Marek Hulan 2018-07-02 13:53:36 UTC
this is a duplicate of 1336236, closing

on Satellite 6.4.0 snap9

# hammer auth-source list
1  | Internal    | AuthSourceInternal 
3  | win2012R2AD | AuthSourceLdap     
5  | External    | AuthSourceExternal 

*** This bug has been marked as a duplicate of bug 1336236 ***

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