Repository navigation
Conversation
This was referenced Sep 29, 2025
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
from
September 30, 2025 11:03
f38d137 to
f8cddd7
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
September 30, 2025 11:03
9c44c4f to
b11c4e8
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
September 30, 2025 11:14
b11c4e8 to
0d9e60a
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
2 times, most recently
from
September 30, 2025 13:04
52770fc to
8390b78
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
September 30, 2025 13:04
0d9e60a to
90528a2
Compare
ThomasK33
marked this pull request as ready for review
September 30, 2025 13:35
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
from
October 2, 2025 17:37
c410a2c to
696cc1d
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
October 2, 2025 17:37
a482459 to
5e55406
Compare
Member
Don't we have a migration to update these scopes + allow lists to convert them to the new api key? Our customers get release by release, so there should be no window after the migration where the old api keys are created. |
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
2 times, most recently
from
October 6, 2025 09:42
ecdebc1 to
b07d6f5
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
2 times, most recently
from
October 6, 2025 10:12
4bb9040 to
cc44d1c
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
2 times, most recently
from
October 6, 2025 10:48
31570ef to
ab61e4e
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
from
October 6, 2025 10:48
cc44d1c to
4c9762e
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
October 6, 2025 11:24
ab61e4e to
009ef1c
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
from
October 6, 2025 11:24
4c9762e to
c9ad043
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
October 6, 2025 11:57
009ef1c to
f5bfb50
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
from
October 6, 2025 11:57
c9ad043 to
610e5e7
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
October 6, 2025 13:30
f5bfb50 to
5da9aa2
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
October 6, 2025 21:16
5da9aa2 to
2307d62
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
2 times, most recently
from
October 6, 2025 21:40
14537db to
fd7df7c
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
2 times, most recently
from
October 7, 2025 16:38
d7b29da to
2d313ef
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
2 times, most recently
from
October 9, 2025 12:56
80f543a to
c18adc2
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
October 9, 2025 12:57
2d313ef to
d34dbe8
Compare
This change introduces backwards compatibility for API keys created before the scopes and allow-lists feature. Previously, these legacy keys had empty scope and allow-list definitions in the database. They are now dynamically interpreted as having `coder:all` scope, granting them full access. This ensures that old, unscoped tokens continue to function as they did before the introduction of fine-grained permissions.
ThomasK33
force-pushed
the
thomask33/09-29-feat_typed_rbac_allow_list
branch
from
October 9, 2025 13:06
c18adc2 to
dda7c9a
Compare
ThomasK33
force-pushed
the
thomask33/09-29-feat_legacy_apikey_backcompat
branch
from
October 9, 2025 13:06
d34dbe8 to
47cccd7
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 legacy API key compatibility
This PR adds support for legacy API keys that were created before the scopes migration. It ensures that API keys with empty scopes and allow lists are properly expanded to have full access permissions, maintaining backward compatibility.
Key changes:
LegacyTokento create API keys that mimic pre-migration database structurecoder:allin the API key conversion logicThis maintains compatibility with older API keys while preserving the new scopes functionality.