feat: add default resource types to composite API key scopes#20412
Closed
ThomasK33 wants to merge 1 commit into
Closed
feat: add default resource types to composite API key scopes#20412ThomasK33 wants to merge 1 commit into
ThomasK33 wants to merge 1 commit into
Conversation
This was referenced Oct 22, 2025
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
98d793b to
15ca185
Compare
d2ce8e3 to
d7a97c4
Compare
0c46ac0 to
cd93ff5
Compare
d7a97c4 to
26ce0ed
Compare
26ce0ed to
b5682aa
Compare
da7b92e to
76abe40
Compare
ddaca3e to
9ab5bfc
Compare
76abe40 to
11ce594
Compare
9ab5bfc to
eb8817a
Compare
11ce594 to
a6683ad
Compare
eb8817a to
16cf91a
Compare
a6683ad to
c928597
Compare
16cf91a to
33ee2a4
Compare
c928597 to
ef4433c
Compare
33ee2a4 to
6bdcaf5
Compare
ef4433c to
f6de31a
Compare
6bdcaf5 to
e41d7f4
Compare
46da335 to
4156c95
Compare
Ensure composite scopes retain required defaults when merging API keys. Add MergeDefaultsForMissingTypes to union composite defaults safely. Cover API key scope expansion and allow list merging with unit tests. Expose SafeAllowList in Subject logging and register user:read scope.
4156c95 to
6bdc93e
Compare
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
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.

Add automatic template access to workspace API tokens
This PR enhances API tokens with composite scopes like
coder:workspaces.createto automatically include required resource types in their allow lists. For example, when a user creates a token withcoder:workspaces.createscope and only specifies a workspace ID in the allow list, the system now automatically adds template access, which is required for workspace creation.The implementation:
DefaultAllowIDListto composite scopes to define required resource typescollectCompositeDefaults()to gather defaults from all scopes in a tokenMergeDefaultsForMissingTypes()to apply defaults only for resource types not already in the allow listThis change makes API tokens more intuitive to use, as users no longer need to manually specify all required resource types for composite operations.