restapi: Restrict access to domain user API for non-admin users - #1019
restapi: Restrict access to domain user API for non-admin users#1019Artemi10 wants to merge 1 commit into
Conversation
Users without admin permissions can access the list and get endpoints of the domain user API. This fix ensures that such users now receive a 403 Forbidden response. Signed-off-by: Liakh Artemii <aliakh@orionsoft.ru>
dupondje
left a comment
There was a problem hiding this comment.
Please see how it's implemented in backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/aaa/BackendUsersResource.java
There you also have isFiltered(), so implement with the same logic.
@dupondje I looked into the To avoid this, implemented a separate method
|
Non-admin users can access the domain user API endpoints (GET /api/domains/{domainId}/users and GET /api/domains/{domainId}/users/{userId}), which is a security issue. This commit adds permission checks to these endpoints. If a user without admin permissions attempts to access them, a 403 Forbidden response will be returned.
Before fix


After fix


Are you the owner of the code you are sending in, or do you have permission of the owner?
Yes