Repository navigation
feat: implement composite API key scopes for workspaces and templates - #19945
Merged
Merged
Conversation
This was referenced Sep 24, 2025
Member
Author
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
3 times, most recently
from
September 24, 2025 16:09
7b3177b to
5ff29e3
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_oauth2_external_scope_metadata
branch
from
September 24, 2025 16:09
c86d555 to
b630882
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 24, 2025 16:27
5ff29e3 to
ed07df0
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_oauth2_external_scope_metadata
branch
2 times, most recently
from
September 24, 2025 16:42
143c808 to
93a509e
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
2 times, most recently
from
September 24, 2025 16:43
6294b46 to
0e26021
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_oauth2_external_scope_metadata
branch
from
September 24, 2025 16:44
93a509e to
8707c00
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
2 times, most recently
from
September 24, 2025 20:50
8a2321b to
61218b2
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_oauth2_external_scope_metadata
branch
2 times, most recently
from
September 25, 2025 15:46
2b7e3a9 to
20c22fe
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
2 times, most recently
from
September 25, 2025 15:46
e49ab65 to
01e4d20
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_oauth2_external_scope_metadata
branch
from
September 25, 2025 15:46
20c22fe to
22123c0
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 25, 2025 15:56
01e4d20 to
84dc70d
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_oauth2_external_scope_metadata
branch
from
September 26, 2025 07:45
94ad114 to
716c772
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 26, 2025 07:45
c84abde to
ba36a7d
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_oauth2_external_scope_metadata
branch
from
September 26, 2025 08:25
716c772 to
8f4b99b
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 26, 2025 08:25
ba36a7d to
a2f4a0a
Compare
johnstcn
reviewed
Sep 26, 2025
ThomasK33
changed the base branch from
thomask33/09-24-add_oauth2_external_scope_metadata
to
graphite-base/19945
September 26, 2025 09:57
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 26, 2025 10:16
a2f4a0a to
c3e13cb
Compare
ThomasK33
force-pushed
the
graphite-base/19945
branch
from
September 26, 2025 10:16
8f4b99b to
05537c1
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
2 times, most recently
from
September 26, 2025 10:20
fe855d8 to
4552f9e
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 26, 2025 12:24
4552f9e to
aa26434
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 26, 2025 14:00
aa26434 to
e830bcb
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
2 times, most recently
from
September 26, 2025 18:05
07a8634 to
ec4f541
Compare
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 28, 2025 10:53
ec4f541 to
ab38e97
Compare
johnstcn
approved these changes
Sep 29, 2025
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 29, 2025 08:25
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.
ThomasK33
force-pushed
the
thomask33/09-24-add_composite_api_key_scopes
branch
from
September 29, 2025 09:46
8210ef2 to
ff05d77
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 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.