Bug #31024
closedHost show api endpoint is slow for non-admin user
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1667647
Description of problem:
When a non-admin user fetches host details, it takes much more time than for admin user. Something similar like:
https://bugzilla.redhat.com/show_bug.cgi?id=1598855
but just for getting host info, not editing.
When applied upstream patch from bz1598855 to Sat 6.4.1, no improvement in performance was noticed. So it is a separate issue (or not sufficiently general patch covering both scenarios).
Version-Release number of selected component (if applicable):
6.4.1, seen also on 6.3
How reproducible:
100%
Steps to Reproduce:
1. Have a Satellite with some Hosts (I think the count does not matter)
2. Have a non-admin user with all rights but not Admin checkbox.
3. Run:
time curl -X GET -s -k -u nonadmin:password https://$(hostname -f)/api/v2/hosts/529 > /dev/null
4. Select Admin checkbox for the user.
5. Run the curl command again.
Actual results:
3. shows several times higher time than 5.
Expected results:
3. shows comparable time like 5. Some higher value is understandable, but not several times more.
Additional info: