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

EVEREST-1096 | remove the hard-coded resource map for enforcer RBAC #476

Merged
merged 8 commits into from
Jul 5, 2024

Conversation

mayankshah1607
Copy link
Member

@mayankshah1607 mayankshah1607 commented Jul 4, 2024

This path-resource map, which was earlier hard-coded, was required for enforcing RBAC on the provided API endpoints. The problem with this is that anytime a new API is added, we have to remember to update this map.

With this change, this map is no longer hard-coded, and RBAC may be enforced on API endpoints simply by adding the x-everest-resource-name annotation in the swagger spec.

api/rbac/rbac.go Outdated Show resolved Hide resolved
@mayankshah1607 mayankshah1607 changed the title EVEREST-1096 | build path to resource map for RBAC based on swagger annotations EVEREST-1096 | remove the hard-coded resource map for enforcer RBAC Jul 4, 2024
@mayankshah1607 mayankshah1607 marked this pull request as ready for review July 4, 2024 06:42
@mayankshah1607 mayankshah1607 requested a review from a team as a code owner July 4, 2024 06:42
api/rbac/rbac.go Show resolved Hide resolved
@mayankshah1607 mayankshah1607 merged commit 4710dd6 into main Jul 5, 2024
11 checks passed
@mayankshah1607 mayankshah1607 deleted the EVEREST-1096.2 branch July 5, 2024 07:44
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