-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: properly set casbin authz policy #1776
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strantalis
force-pushed
the
casbin-fixes
branch
from
November 25, 2024 20:58
d18cd38
to
bc6d285
Compare
elizabethhealy
approved these changes
Nov 26, 2024
There is some deprecation here that has been removed, but since it was for internal purposes there is no concern about consumers being impacted. We are leaving deprecated yaml config such as |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 27, 2024
🤖 I have created a release *beep* *boop* --- ## [0.4.30](service/v0.4.29...service/v0.4.30) (2024-11-27) ### Features * **core:** Introduce ERS mode, ability to connect to remote ERS ([#1735](#1735)) ([a118316](a118316)) * **policy:** limit/offset throughout LIST service RPCs/db ([#1669](#1669)) ([ec46a3a](ec46a3a)), closes [#55](#55) ### Bug Fixes * **core:** Autobump service ([#1789](#1789)) ([ff7c6f3](ff7c6f3)) * **core:** Set token endpoint manually if client creds provided in server sdk_config ([#1780](#1780)) ([07a1dbd](07a1dbd)) * properly set casbin authz policy ([#1776](#1776)) ([d4b501c](d4b501c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
When calling the SetPolicy function it was overwrittng what ever was defined within the yaml configuration. This pr addresses this by changing the current functionality to overwrite the default policy while still allowing the policy in configuration to take precedence.
The pull request also introduces two new fields
UsernameClaim
andGroupsClaim
aligning more with openid based claim names and not keycloak realm roles. The authz policy will pull the username and list of groups and run them through the casbin enforce function now. A user can now scope a policy to a username.Checklist
Testing Instructions