Bug 2208588
| Summary: | Unable to access Satellite 6 API using non-admin users. | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Akshay Kapse <akapse> |
| Component: | Users & Roles | Assignee: | Adam Ruzicka <aruzicka> |
| Status: | CLOSED ERRATA | QA Contact: | Lukáš Hellebrandt <lhellebr> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.12.4 | CC: | aruzicka, lhellebr, mhulan, oezr, pcreech |
| Target Milestone: | 6.15.0 | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-04-23 17:11:17 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
Akshay Kapse
2023-05-19 16:45:31 UTC
What do you expect to get from that particular endpoint? Hello, If we check non-admin user as "Administrator" it shows API details. Can we have some role for that so that non-admin user can get idea about API calls while using them? Thanks, Created redmine issue https://projects.theforeman.org/issues/36449 from this bug Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36449 has been resolved. Bulk setting Target Milestone = 6.15.0 where sat-6.15.0+ is set. Verified with Sat 6.15.0 snap 1.0.
$ curl -k -utest_noperms:changeme -H "Content-Type: application/json" https://<FQDN>/api/v2 | pprint | grep "List all hosts"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 51793 100 51793 0 0 49705 0 0:00:01 0:00:01 --:--:-- 49705
"List all hosts": "/api/hosts",
$ curl -k -utest_allperms:changeme -H "Content-Type: application/json" https://<FQDN>/api/v2 | pprint | grep "List all hosts"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 51793 100 51793 0 0 58457 0 --:--:-- --:--:-- --:--:-- 58391
"List all hosts": "/api/hosts",
$ curl -k -uadmin:changeme -H "Content-Type: application/json" https://<FQDN>/api/v2 | pprint | grep "List all hosts"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 51793 100 51793 0 0 15728 0 0:00:03 0:00:03 --:--:-- 15728
"List all hosts": "/api/hosts",
$ curl -k -utest_noperms:changeme -H "Content-Type: application/json" https://<FQDN>/api/v2/hosts | pprint
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 144 0 144 0 0 283 0 --:--:-- --:--:-- --:--:-- 282
{
"error": {
"message": "Access denied",
"details": "Missing one of the required permissions: view_hosts",
"missing_permissions": [
"view_hosts"
]
}
}
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 (Important: Satellite 6.15.0 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-2024:2010 |