fix: Change auth from WRITE to READ for specGetAll#19272
fix: Change auth from WRITE to READ for specGetAll#19272aho135 wants to merge 1 commit intoapache:masterfrom
Conversation
|
I've often believed that WRITE is appropriate for permissions like this, on the rationale that the ingestion APIs should only be accessible to people with ability to manipulate ingestion objects, which of course requires WRITE permission. I guess your mental model is different, one where READ permission means the user can see ingestion objects but not necessary manipulate them. I wish that the permission model was more fine grained so we could separate READ of the data from READ of the ingestion objects. I wonder, what's the current state of things? What authorization do other read-only APIs in |
Thanks for the review @gianm!
I believe @clintropolis was working on something similar to this with the addition of a Policy in the Authorizer to allow more granular control over table reads
These API's also follow the model where users can READ all ingestion objects, but manipulation still requires WRITE. For example, task submission requires write, but |
Description
The current implementation of specGetAll is unnecessarily restrictive as it uses DATASOURCE_WRITE_RA_GENERATOR for authorization. This PR changes the Authorization to only require READ. This issue was surfaced after testing out the endpoint with the Read Only Authorizer enabled. Since the history endpoint already returns the list of all Supervisors with Read access this change makes the authorization consistent across the two endpoints
Fixed the bug ...
specGetAll returns an empty list for Supervisors when read only authorization is enabled
Release note
Key changed/added classes in this PR
SupervisorResourceSupervisorResourceTestThis PR has: