-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bulk Permission Checks Endpoint #294
Add Bulk Permission Checks Endpoint #294
Conversation
`POST /v1/allow/bulk` This endpoint takes a list of `<resource, action>` as input, and returns the permission checks outcome of each input Signed-off-by: Bailin He <[email protected]>
internal/api/permissions.go
Outdated
type checkActionResponse struct { | ||
ResourceID string `json:"resource_id"` | ||
Action string `json:"action"` | ||
HasPermission bool `json:"has_permission"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have a minor preference for a boolean result to be named something like Allowed
given that we have some consumer-facing stuff that refers to access check results as "allowed" or "denied" elsewhere (like https://github.com/metal-toolbox/iam-runtime/blob/main/proto/authorization/authorization.proto#L40-L44) but otherwise 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we should keep similar terminology.
internal/api/permissions.go
Outdated
type checkActionResponse struct { | ||
ResourceID string `json:"resource_id"` | ||
Action string `json:"action"` | ||
HasPermission bool `json:"has_permission"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we should keep similar terminology.
Signed-off-by: Bailin He <[email protected]>
POST /v1/allow/bulk
This endpoint takes a list of
<resource, action>
as input, and returns the permission checks outcome of each input