- Notifications
You must be signed in to change notification settings - Fork1k
feat: implement composite API key scopes for workspaces and templates#19945
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
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 24, 2025
MemberAuthor
ThomasK33 commentedSep 24, 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.
7b3177b
to5ff29e3
Comparec86d555
tob630882
Compare5ff29e3
toed07df0
Compare143c808
to93a509e
Compare6294b46
to0e26021
Compare93a509e
to8707c00
Compare8a2321b
to61218b2
Compare2b7e3a9
to20c22fe
Comparee49ab65
to01e4d20
Compare20c22fe
to22123c0
Compare01e4d20
to84dc70d
Compare94ad114
to716c772
Comparec84abde
toba36a7d
Compare716c772
to8f4b99b
Compareba36a7d
toa2f4a0a
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
a2f4a0a
toc3e13cb
Compare8f4b99b
to05537c1
Comparefe855d8
to4552f9e
Compare4552f9e
toaa26434
Compareaa26434
toe830bcb
Compare07a8634
toec4f541
Compareec4f541
toab38e97
Comparejohnstcn approved these changesSep 29, 2025
Uh oh!
There was an error while loading.Please reload this page.
ab38e97
to8210ef2
CompareAdd high-level composite scopes that expand to multiple low-levelpermissions:- coder:workspaces.create - Template read/use + workspace CRUD- coder:workspaces.operate - Workspace read/update- coder:workspaces.delete - Workspace read/delete- coder:workspaces.access - Workspace read/SSH/app connect- coder:templates.build - Template read + file ops + provisioner jobs- coder:templates.author - Full template management + insights- coder:apikeys.manage_self - Self API key managementThese composite scopes provide intuitive high-level permissions whilemaintaining granular control through existing low-level scopes.Database enum values are persisted to enable storing composite namesdirectly in tokens.
8210ef2
toff05d77
Compare79126ab
intomain 37 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
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 Composite API Key Scopes
This PR adds high-level composite API key scopes to simplify token creation with common permission sets:
coder:workspaces.create
- Create and update workspacescoder:workspaces.operate
- Read and update workspacescoder:workspaces.delete
- Read and delete workspacescoder:workspaces.access
- Read, SSH, and connect to workspace applicationscoder:templates.build
- Read templates and create/read filescoder:templates.author
- Full template management with insightscoder:apikeys.manage_self
- Manage your own API keysThese composite scopes are persisted in the database and expanded during authorization, providing a more intuitive way to grant permissions compared to the granular resource:action scopes.