- Notifications
You must be signed in to change notification settings - Fork1k
fix: improve RBAC scope allow list handling for create actions#20008
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
ThomasK33 wants to merge1 commit intothomask33/09-26-add_token_scope_support_in_cliChoose a base branch fromthomask33/09-29-feat_typed_rbac_allow_list
base:thomask33/09-26-add_token_scope_support_in_cli
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or 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
This was referencedSep 29, 2025
MemberAuthor
ThomasK33 commentedSep 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stackon Graphite.
This stack of pull requests is managed byGraphite. Learn more aboutstacking. |
This was linked to issuesSep 29, 2025
This was unlinked from issuesSep 29, 2025
5ac8d9c
tobd1ff54
Comparef53f9aa
to7a79289
Compare7a79289
tof38d137
Comparebd1ff54
toeedeed8
Compare09d60e6
to4bb9040
Compare4280771
to384a406
Comparecc44d1c
to4c9762e
Compare154d4a1
tocafac8d
Comparec9ad043
to610e5e7
Comparecafac8d
to393492a
Compare610e5e7
to14537db
Compare393492a
to2c9a4c1
Compare14537db
tofd7df7c
Compare7915a16
toe153689
Comparefd7df7c
to80f543a
Comparee153689
to48d0e45
Compare80f543a
toc18adc2
Compare48d0e45
to0f2c153
Comparec18adc2
todda7c9a
CompareThe allow_list for RBAC scopes has been updated to use typed elementsof the form `{type: string, id: string}` instead of raw string IDs.This change enables more granular authorization policies. Specifically, itmodifies the behavior for "create" actions. A create operation is nowpermitted if the scope's allow_list contains an entry matching theresource type, even without a specific ID. This is useful for scenarioslike workspace agent tokens which need to create resources but cannotknow the ID ahead of time.For all other actions (e.g., read, update, delete), the allow_listmust still contain an entry that matches both the type and the specificID of the resource.The Rego policy, relevant Go code, and tests have been updated toimplement and verify this new typed allow_list behavior.
dda7c9a
to31abb13
Compare This was referencedOct 9, 2025
Sign up for freeto 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.
Fix API key scope authorization for workspace creation
This PR fixes an issue with API key scopes and workspace creation. Previously, the RBAC policy allowed creation of resources with an empty ID in the allow list, but this approach was inconsistent with how other permissions work.
The changes:
These changes ensure that API key scopes are properly enforced for creation operations while maintaining backward compatibility.