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: add multi-scope support to API keys#19917

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

Merged

Conversation

ThomasK33
Copy link
Member

Canonicalize API Key Scopes

This PR introduces canonical API key scopes with acoder: namespace prefix to avoid collisions with low-level resource:action names. It:

  1. Renames special API key scopes in the database:

    • allcoder:all
    • application_connectcoder:application_connect
  2. Adds support for a newscopes field in the API key creation request, allowing multiple scopes to be specified while maintaining backward compatibility with the singularscope field.

  3. Updates the API documentation to reflect these changes, including the new endpoint for listing public API key scopes.

  4. Ensures backward compatibility by mapping between legacy and canonical scope names in relevant code paths.

@ThomasK33Graphite App
Copy link
MemberAuthor

ThomasK33 commentedSep 22, 2025
edited
Loading

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

@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch 9 times, most recently fromb25f825 toae9cd7cCompareSeptember 23, 2025 10:10
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch from3e06647 to8f46553CompareSeptember 23, 2025 10:12
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch fromae9cd7c to24afdeaCompareSeptember 23, 2025 10:29
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch 2 times, most recently fromb5a1899 todf26fdeCompareSeptember 23, 2025 10:51
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch from24afdea to592b758CompareSeptember 23, 2025 10:51
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch fromdf26fde to379833fCompareSeptember 23, 2025 12:34
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch from592b758 to3223b46CompareSeptember 23, 2025 12:38
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch 2 times, most recently fromdd9f91b to29f787fCompareSeptember 23, 2025 13:45
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch 2 times, most recently frome3bf61c toc29d8ceCompareSeptember 23, 2025 13:58
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch from29f787f to7f43f71CompareSeptember 23, 2025 13:58
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch fromc29d8ce to5562ff4CompareSeptember 23, 2025 14:29
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch froma4a9d57 toacadd79CompareSeptember 25, 2025 15:56
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch 2 times, most recently from6b9783a toa3329a4CompareSeptember 25, 2025 16:07
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch fromacadd79 tob8267e1CompareSeptember 25, 2025 16:07
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch froma3329a4 to45d6550CompareSeptember 25, 2025 16:25
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch 6 times, most recently from1c54aa1 to92a39d1CompareSeptember 25, 2025 17:39
@ThomasK33ThomasK33 marked this pull request as ready for reviewSeptember 25, 2025 17:45
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch from45d6550 to7f0cdfdCompareSeptember 26, 2025 07:45
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch 2 times, most recently from1d1eb15 tofd6e329CompareSeptember 26, 2025 08:25
@ThomasK33ThomasK33force-pushed thethomask33/09-22-feat_add_public_api_key_scope_endpoint branch from7f0cdfd to2ea1b29CompareSeptember 26, 2025 08:25
@ThomasK33Graphite App
Copy link
MemberAuthor

ThomasK33 commentedSep 26, 2025
edited
Loading

Merge activity

  • Sep 26, 9:30 AM UTC: A user started a stack merge that includes this pull request viaGraphite.
  • Sep 26, 9:45 AM UTC:Graphite rebased this pull request as part of a merge.
  • Sep 26, 9:56 AM UTC:@ThomasK33 merged this pull request withGraphite.

@ThomasK33ThomasK33 changed the base branch fromthomask33/09-22-feat_add_public_api_key_scope_endpoint tographite-base/19917September 26, 2025 09:31
@ThomasK33ThomasK33 changed the base branch fromgraphite-base/19917 tomainSeptember 26, 2025 09:43
This change unifies scope handling by migrating special scopes to thecoder:* namespace while maintaining backward compatibility:- Database: 'all' -> 'coder:all', 'application_connect' ->   'coder:application_connect'- API accepts both legacy and canonical forms in requests- Responses maintain legacy format for existing client compatibility- Scope catalog returns all public scopes including canonical specials- Validation enforces public scope requirements using unified logicThe migration preserves existing API key functionality while establishingconsistent scope naming conventions for future extensibility.
@ThomasK33ThomasK33force-pushed thethomask33/09-22-canonicalize_special_api_key_scopes branch fromfd6e329 toc66a19cCompareSeptember 26, 2025 09:44
@ThomasK33ThomasK33 merged commitd0db9ec intomainSep 26, 2025
37 checks passed
@ThomasK33ThomasK33 deleted the thomask33/09-22-canonicalize_special_api_key_scopes branchSeptember 26, 2025 09:56
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 26, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@EmyrkEmyrkEmyrk approved these changes

Assignees

@ThomasK33ThomasK33

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ThomasK33@johnstcn@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp