- Notifications
You must be signed in to change notification settings - Fork1k
Commit546e08e
committed
refactor: add allow_list field to API keys for resource scoping
- Add allow_list field to CreateTokenRequest API and database schema- Implement APIKeyEffectiveScope that merges scopes with token allow_list- Create x/wildcard package for type-safe wildcard values- Add rbac.ParseAllowList for validating and normalizing allow lists- Support resource targeting like "workspace:*" or "template:<uuid>"- Default to wildcard (*:*) for backward compatibility1 parent67e3e31 commit546e08e
File tree
26 files changed
+836
-40
lines changed- coderd
- apidoc
- apikey
- database
- dbauthz
- dbgen
- httpmw
- rbac
- codersdk
- docs/reference/api
- scripts/apitypings
- testdata/wildcarduse
- site/src/api
- x/wildcard
26 files changed
+836
-40
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + |
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 | |
---|---|---|---|
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
119 | 158 |
| |
120 | 159 |
| |
121 | 160 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 |
| |
38 | 41 |
| |
39 | 42 |
| |
| |||
115 | 118 |
| |
116 | 119 |
| |
117 | 120 |
| |
118 |
| - | |
| 121 | + | |
119 | 122 |
| |
120 | 123 |
| |
121 | 124 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
| |||
225 | 226 |
| |
226 | 227 |
| |
227 | 228 |
| |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
228 | 234 |
| |
229 | 235 |
| |
230 | 236 |
| |
231 | 237 |
| |
232 | 238 |
| |
233 | 239 |
| |
234 | 240 |
| |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
239 | 244 |
| |
240 | 245 |
| |
241 | 246 |
| |
| |||
247 | 252 |
| |
248 | 253 |
| |
249 | 254 |
| |
250 |
| - | |
| 255 | + | |
| 256 | + | |
251 | 257 |
| |
252 | 258 |
| |
253 | 259 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 |
| - | |
| 189 | + | |
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
238 | 273 |
| |
239 | 274 |
| |
240 | 275 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
163 | 164 |
| |
164 | 165 |
| |
165 | 166 |
| |
166 |
| - | |
167 |
| - | |
168 |
| - | |
| 167 | + | |
169 | 168 |
| |
170 | 169 |
| |
171 | 170 |
| |
| |||
318 | 317 |
| |
319 | 318 |
| |
320 | 319 |
| |
321 |
| - | |
322 |
| - | |
| 320 | + | |
| 321 | + | |
323 | 322 |
| |
324 | 323 |
| |
325 | 324 |
| |
326 |
| - | |
327 |
| - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
328 | 346 |
| |
329 | 347 |
| |
330 | 348 |
| |
331 | 349 |
| |
332 |
| - | |
| 350 | + | |
333 | 351 |
| |
334 | 352 |
| |
335 | 353 |
| |
336 |
| - | |
337 |
| - | |
338 | 354 |
| |
339 |
| - | |
340 |
| - | |
| 355 | + | |
| 356 | + | |
341 | 357 |
| |
342 | 358 |
| |
343 | 359 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
434 | 434 |
| |
435 | 435 |
| |
436 | 436 |
| |
437 |
| - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
438 | 441 |
| |
439 | 442 |
| |
440 | 443 |
| |
|
0 commit comments
Comments
(0)