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:
The redhat.satellite.external_usergroup calls this API --> GET /api/usergroups/:usergroup_id/external_usergroups
As per the satellite apidoc the :usergroup_id , should be a string
But if I decide to use a satellite usergroup name e.g "1-group" , it fails whereas "1 group" works fine.
So the hyphen (-) is creating some sort of issue here.
Version-Release number of selected component (if applicable):
Satellite 6.9
How reproducible:
Always
Steps to Reproduce:
1. Build a Satellite 6.9
2. Create a usergroup by name "1-group"
3. Run following API --> curl -ku admin:RedHat1! "https://satellite.example.com/api/v2/usergroups/1-group/external_usergroups/"
4. Modify the usergroup name from "1-group" to "1 group"
5. Run following API --> curl -ku admin:RedHat1! "https://satellite.example.com/api/v2/usergroups/1%20group/external_usergroups/"
Actual results:
Step 3 error:
~~
{
"error": {"message":"Resource external_usergroup not found by id ''"}
}
~~
Step 5 success:
~~
{
"total": 0,
"subtotal": 0,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": []
}
~~
Expected results:
Step 3 should be successful as well.
Additional info:
This affects the working of redhat.satellite.external_usergroup module if customer decided to map an AD group to Satellite usergroup by name "043-enterprise systems"
A workaround until this is fixed properly is to use the usergroup ID instead of its name in the api call, e.g. (assuming for example that the usergroups has id 5) `/api/usergroups/5/external_usergroups` or `/api/usergroups/5-043-enterprise systems/external_usergroups` instead of `/api/usergroups/043-enterprise systems/external_usergroups`. The root cause is that one of the functions incorrectly assumes that the number at the start of the usergroup name indicates its ID and tries (and fails) to find a usergroup with that ID.
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.11 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-2022:5498