Skip to content
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

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

bailinhe
Copy link
Contributor

POST /v1/allow/bulk

This endpoint takes a list of <resource, action> as input, and returns the permission checks outcome of each input

`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]>
@bailinhe bailinhe requested review from a team as code owners October 23, 2024 20:41
type checkActionResponse struct {
ResourceID string `json:"resource_id"`
Action string `json:"action"`
HasPermission bool `json:"has_permission"`
Copy link
Contributor

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 👍

Copy link
Contributor

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.

jacobsee
jacobsee previously approved these changes Oct 24, 2024
type checkActionResponse struct {
ResourceID string `json:"resource_id"`
Action string `json:"action"`
HasPermission bool `json:"has_permission"`
Copy link
Contributor

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]>
@bailinhe bailinhe merged commit 6fe19eb into infratographer:main Oct 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants