mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
4bda39585d
# Add support for low-level API key scopes This 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 scopes 2. Generated constants in the SDK for all public scopes 3. Tests to verify scope validation during token creation 4. Updated API documentation to reflect the expanded scope options The 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 #19847
6 lines
97 B
Go
6 lines
97 B
Go
package codersdk
|
|
|
|
type ExternalAPIKeyScopes struct {
|
|
External []APIKeyScope `json:"external"`
|
|
}
|