- Notifications
You must be signed in to change notification settings - Fork1k
feat: improve RBAC resource ID matching and structured allowlist targets#20035
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
Draft
ThomasK33 wants to merge1 commit intothomask33/09-29-feat_legacy_apikey_backcompatChoose a base branch fromthomask33/09-30-api_allowlist_structured_json
base:thomask33/09-29-feat_legacy_apikey_backcompat
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.
Draft
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 30, 2025
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. |
90528a2
toa3e10c2
Comparefcd6e93
toe2effa4
Compare5058a5a
toa482459
Comparee2effa4
to1db9559
Compare5e55406
toecdebc1
Compare1db9559
to1fe2126
Compareecdebc1
tob07d6f5
Compare1fe2126
to79f06c2
Compareb07d6f5
to31570ef
Compare79f06c2
to421cee2
Compare31570ef
toab61e4e
Compare9b8d5d8
tod0f3a09
Compareab61e4e
to009ef1c
Compared0f3a09
toa6ad02f
Compare009ef1c
tof5bfb50
Comparea6ad02f
todf72f10
Comparef5bfb50
to5da9aa2
Comparedf72f10
to92720a2
Compare2307d62
tod7b29da
Compare92720a2
to008fc1a
CompareAPIAllowListTarget now marshals to/from structured JSON objects`{"type":"workspace","id":"<uuid>"}` instead of colon-delimitedstrings. This improves type safety and frontend ergonomics.Changes:- Modified UnmarshalJSON to parse structured object representation- Extracted setValues helper for shared validation logic- Preserved UnmarshalText for backward compatibility with CLI flags and database helpers- Added MarshalJSON/UnmarshalJSON to x/wildcard/Value for proper JSON handling of wildcard values- Updated frontend mock data to use structured format- Added test coverage for both text and object unmarshaling- Added resource ID matchers to regosql converters for template and workspace ID filtering
008fc1a
tof516f26
Compared7b29da
to2d313ef
CompareSign 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.
Structured JSON Representation for Allow List Targets
This PR changes the JSON representation of
APIAllowListTarget
from a string format ("type:id"
) to a structured object format ({"type": "...", "id": "..."}
). The change maintains backward compatibility by preserving the string format for text marshaling/unmarshaling, which is used by CLI flag parsing and database helpers.Key changes:
APIAllowListTarget
to use JSON struct tagswildcard.Value
typeThis change improves the API's consistency and makes it easier to work with allow list targets in the frontend.