- Notifications
You must be signed in to change notification settings - Fork1k
Commit4bda395
authored
feat: add external API key scopes (#19916)
# Add support for low-level API key scopesThis PR adds support for fine-grained API key scopes based on RBAC resource:action pairs. It includes:1. A new endpoint `/api/v2/auth/scopes` to list all public low-level API key scopes2. Generated constants in the SDK for all public scopes3. Tests to verify scope validation during token creation4. Updated API documentation to reflect the expanded scope optionsThe implementation allows users to create API keys with specific permissions like `workspace:read` or `template:use` instead of only the legacy `all` or `application_connect` scopes.Fixes#198471 parentb7e0b2a commit4bda395
File tree
17 files changed
+676
-57
lines changed- coderd
- apidoc
- apikey
- coderdtest
- codersdk
- docs/reference/api
- scripts/apikeyscopesgen
- site/src/api
17 files changed
+676
-57
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
651 | 651 |
| |
652 | 652 |
| |
653 | 653 |
| |
| 654 | + | |
654 | 655 |
| |
655 | 656 |
| |
656 | 657 |
| |
| |||
870 | 871 |
| |
871 | 872 |
| |
872 | 873 |
| |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
873 | 880 |
| |
874 | 881 |
| |
875 | 882 |
| |
|
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 |
| - | |
70 |
| - | |
71 |
| - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
72 | 82 |
| |
73 | 83 |
| |
74 | 84 |
| |
| |||
81 | 91 |
| |
82 | 92 |
| |
83 | 93 |
| |
84 |
| - | |
| 94 | + | |
85 | 95 |
| |
86 | 96 |
| |
87 | 97 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 |
| - | |
30 |
| - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 |
| |
32 | 39 |
| |
33 | 40 |
| |
| |||
62 | 69 |
| |
63 | 70 |
| |
64 | 71 |
| |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 |
| |
72 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
73 | 86 |
| |
74 | 87 |
| |
75 | 88 |
| |
| |||
92 | 105 |
| |
93 | 106 |
| |
94 | 107 |
| |
95 |
| - | |
| 108 | + | |
96 | 109 |
| |
97 | 110 |
| |
98 | 111 |
| |
|
0 commit comments
Comments
(0)