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 1583997

Summary: hammer auth-source ldap list gives 404 if called with saved default organization or location
Product: Red Hat Satellite Reporter: Pooja Trivedi <ptrivedi>
Component: APIAssignee: Rahul Bajaj <rabajaj>
Status: CLOSED WONTFIX QA Contact: vijsingh
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: apatel, bkearney, dhlavacd, kgaikwad, mbacovsk, mhulan, ofedoren, rabajaj
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-15 20:30:29 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 Pooja Trivedi 2018-05-30 07:01:05 UTC
Description of problem:
The command hammer auth-source ldap list is not running successfully and it gives error as 404 Resource Not Found

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


How reproducible:


Steps to Reproduce:
1. set hammer defaults with organization and organization-id
2. Run hammer auth-source ldap list 


Actual results: The hammer command is being called with the default options set for organization-id and gives the error


Expected results: 

When running the command hammer auth-source ldap list it should list authentication sources but it returns a 404 error


Additional info: 


To fix the issue we followed the below steps 

 # hammer default list
 # hammer defaults delete --param-name location-id

The below API is being called when running the command hammer auth-source ldap list :

GET /api/organizations/1/auth_source_ldaps  ------> this API call is incorrect, it should be /api/auth_source_ldaps

Comment 1 Oleh Fedorenko 2019-08-14 14:48:20 UTC
This is not a bug in hammer:

I did some investigation and it seems that a problem is in missing routes (on the server side) for API endpoints that use location/organization scope for getting auth-source ldap list.

Hammer just uses documented in Satellite 6.3 API endpoints (e.g. GET /api/organizations/:organization_id/auth_source_ldaps), which are missing corresponding routes and this causes mentioned error.

Moreover, the needed routes were added in Foreman 1.18 (Satellite 6.4) by https://github.com/theforeman/foreman/pull/4865 (see https://github.com/theforeman/foreman/pull/4865/files#diff-83737aa988d7e8c6ef57d0efd0776854R32).

Currently I see two solutions:
  1. Remove the apidocs for GET /api/[organizations|locations]/:id/auth_source_ldaps (not so good)
  2. Cherry-pick from 1.18 (see above). But I'm not sure this is possible.

Anyway, moving to API component since it's not a hammer bug.

Comment 2 Bryan Kearney 2019-12-03 16:34:44 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 3 Bryan Kearney 2020-01-15 20:30:29 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.