Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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_backcompat
base:thomask33/09-29-feat_legacy_apikey_backcompat
Choose a base branch
Loading
fromthomask33/09-30-api_allowlist_structured_json

Conversation

ThomasK33
Copy link
Member

Structured JSON Representation for Allow List Targets

This PR changes the JSON representation ofAPIAllowListTarget 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:

  • UpdatedAPIAllowListTarget to use JSON struct tags
  • Implemented separate JSON and Text marshaling/unmarshaling logic
  • Added JSON marshaling/unmarshaling to thewildcard.Value type
  • Fixed SQL variable matchers for workspace and template IDs
  • Added test cases for both string and object formats

This change improves the API's consistency and makes it easier to work with allow list targets in the frontend.

@ThomasK33Graphite App
Copy link
MemberAuthor

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.
Learn more

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch from90528a2 toa3e10c2CompareSeptember 30, 2025 14:02
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch 4 times, most recently fromfcd6e93 toe2effa4CompareOctober 2, 2025 07:35
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch from5058a5a toa482459CompareOctober 2, 2025 07:35
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch frome2effa4 to1db9559CompareOctober 2, 2025 17:37
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch 2 times, most recently from5e55406 toecdebc1CompareOctober 3, 2025 17:59
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch from1db9559 to1fe2126CompareOctober 3, 2025 17:59
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch fromecdebc1 tob07d6f5CompareOctober 6, 2025 09:42
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch from1fe2126 to79f06c2CompareOctober 6, 2025 09:42
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch fromb07d6f5 to31570efCompareOctober 6, 2025 10:12
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch from79f06c2 to421cee2CompareOctober 6, 2025 10:13
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch from31570ef toab61e4eCompareOctober 6, 2025 10:48
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch 2 times, most recently from9b8d5d8 tod0f3a09CompareOctober 6, 2025 11:24
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch fromab61e4e to009ef1cCompareOctober 6, 2025 11:24
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch fromd0f3a09 toa6ad02fCompareOctober 6, 2025 11:57
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch from009ef1c tof5bfb50CompareOctober 6, 2025 11:57
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch froma6ad02f todf72f10CompareOctober 6, 2025 13:30
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch fromf5bfb50 to5da9aa2CompareOctober 6, 2025 13:30
@EmyrkEmyrk self-assigned thisOct 6, 2025
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch fromdf72f10 to92720a2CompareOctober 6, 2025 21:16
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch 2 times, most recently from2307d62 tod7b29daCompareOctober 6, 2025 21:40
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch from92720a2 to008fc1aCompareOctober 6, 2025 21:40
APIAllowListTarget 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
@ThomasK33ThomasK33force-pushed thethomask33/09-30-api_allowlist_structured_json branch from008fc1a tof516f26CompareOctober 7, 2025 16:38
@ThomasK33ThomasK33force-pushed thethomask33/09-29-feat_legacy_apikey_backcompat branch fromd7b29da to2d313efCompareOctober 7, 2025 16:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@EmyrkEmyrkAwaiting requested review from EmyrkEmyrk will be requested when the pull request is marked ready for reviewEmyrk is a code owner

Assignees

@ThomasK33ThomasK33

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ThomasK33@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp