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.

Bug 1448179

Summary: Hammer auth-source didn't list all sources
Product: Red Hat Satellite Reporter: Waldirio M Pinheiro <wpinheir>
Component: HammerAssignee: Dominik Hlavac Duran <dhlavacd>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.8CC: bkearney, dhlavacd, mhulan, pa.van.der.sar, tstrachota, wpinheir
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-02 13:53:36 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 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):
6.2.9

How reproducible:
100%

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;"*
3.

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
---|------|--------|------|---------------
ID | NAME | LDAPS? | PORT | SERVER TYPE   
---|------|--------|------|---------------
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
---|-------------|--------------------
ID | NAME        | TYPE OF AUTH SOURCE
---|-------------|--------------------
1  | Internal    | AuthSourceInternal 
3  | win2012R2AD | AuthSourceLdap     
5  | External    | AuthSourceExternal 
---|-------------|--------------------

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