-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
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 referenced Sep 24, 2025
Member
Author
7b3177b to
5ff29e3
Compare
c86d555 to
b630882
Compare
5ff29e3 to
ed07df0
Compare
143c808 to
93a509e
Compare
6294b46 to
0e26021
Compare
93a509e to
8707c00
Compare
8a2321b to
61218b2
Compare
2b7e3a9 to
20c22fe
Compare
e49ab65 to
01e4d20
Compare
20c22fe to
22123c0
Compare
01e4d20 to
84dc70d
Compare
94ad114 to
716c772
Compare
c84abde to
ba36a7d
Compare
716c772 to
8f4b99b
Compare
ba36a7d to
a2f4a0a
Compare
johnstcn
reviewed
Sep 26, 2025
a2f4a0a to
c3e13cb
Compare
8f4b99b to
05537c1
Compare
fe855d8 to
4552f9e
Compare
4552f9e to
aa26434
Compare
aa26434 to
e830bcb
Compare
07a8634 to
ec4f541
Compare
ec4f541 to
ab38e97
Compare
johnstcn
approved these changes
Sep 29, 2025
ab38e97 to
8210ef2
Compare
Add high-level composite scopes that expand to multiple low-level permissions: - 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 management These composite scopes provide intuitive high-level permissions while maintaining granular control through existing low-level scopes. Database enum values are persisted to enable storing composite names directly in tokens.
8210ef2 to
ff05d77
Compare
Sign up for free
to 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.