Files
coder/codersdk/apikey_scopes_gen.go
T
Thomas Kosiewski 79126ab6c7 feat: implement composite API key scopes for workspaces and templates (#19945)
# 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 workspaces
- `coder:workspaces.operate` - Read and update workspaces
- `coder:workspaces.delete` - Read and delete workspaces
- `coder:workspaces.access` - Read, SSH, and connect to workspace applications
- `coder:templates.build` - Read templates and create/read files
- `coder:templates.author` - Full template management with insights
- `coder:apikeys.manage_self` - Manage your own API keys

These 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.
2025-09-29 13:17:08 +02:00

92 lines
4.3 KiB
Go

// Code generated by scripts/apikeyscopesgen. DO NOT EDIT.
package codersdk
const (
// Deprecated: use codersdk.APIKeyScopeCoderAll instead.
APIKeyScopeAll APIKeyScope = "all"
// Deprecated: use codersdk.APIKeyScopeCoderApplicationConnect instead.
APIKeyScopeApplicationConnect APIKeyScope = "application_connect"
APIKeyScopeApiKeyAll APIKeyScope = "api_key:*"
APIKeyScopeApiKeyCreate APIKeyScope = "api_key:create"
APIKeyScopeApiKeyDelete APIKeyScope = "api_key:delete"
APIKeyScopeApiKeyRead APIKeyScope = "api_key:read"
APIKeyScopeApiKeyUpdate APIKeyScope = "api_key:update"
APIKeyScopeCoderAll APIKeyScope = "coder:all"
APIKeyScopeCoderApikeysManageSelf APIKeyScope = "coder:apikeys.manage_self"
APIKeyScopeCoderApplicationConnect APIKeyScope = "coder:application_connect"
APIKeyScopeCoderTemplatesAuthor APIKeyScope = "coder:templates.author"
APIKeyScopeCoderTemplatesBuild APIKeyScope = "coder:templates.build"
APIKeyScopeCoderWorkspacesAccess APIKeyScope = "coder:workspaces.access"
APIKeyScopeCoderWorkspacesCreate APIKeyScope = "coder:workspaces.create"
APIKeyScopeCoderWorkspacesDelete APIKeyScope = "coder:workspaces.delete"
APIKeyScopeCoderWorkspacesOperate APIKeyScope = "coder:workspaces.operate"
APIKeyScopeFileAll APIKeyScope = "file:*"
APIKeyScopeFileCreate APIKeyScope = "file:create"
APIKeyScopeFileRead APIKeyScope = "file:read"
APIKeyScopeTemplateAll APIKeyScope = "template:*"
APIKeyScopeTemplateCreate APIKeyScope = "template:create"
APIKeyScopeTemplateDelete APIKeyScope = "template:delete"
APIKeyScopeTemplateRead APIKeyScope = "template:read"
APIKeyScopeTemplateUpdate APIKeyScope = "template:update"
APIKeyScopeTemplateUse APIKeyScope = "template:use"
APIKeyScopeUserReadPersonal APIKeyScope = "user:read_personal"
APIKeyScopeUserUpdatePersonal APIKeyScope = "user:update_personal"
APIKeyScopeUserSecretAll APIKeyScope = "user_secret:*"
APIKeyScopeUserSecretCreate APIKeyScope = "user_secret:create"
APIKeyScopeUserSecretDelete APIKeyScope = "user_secret:delete"
APIKeyScopeUserSecretRead APIKeyScope = "user_secret:read"
APIKeyScopeUserSecretUpdate APIKeyScope = "user_secret:update"
APIKeyScopeWorkspaceAll APIKeyScope = "workspace:*"
APIKeyScopeWorkspaceApplicationConnect APIKeyScope = "workspace:application_connect"
APIKeyScopeWorkspaceCreate APIKeyScope = "workspace:create"
APIKeyScopeWorkspaceDelete APIKeyScope = "workspace:delete"
APIKeyScopeWorkspaceRead APIKeyScope = "workspace:read"
APIKeyScopeWorkspaceSsh APIKeyScope = "workspace:ssh"
APIKeyScopeWorkspaceStart APIKeyScope = "workspace:start"
APIKeyScopeWorkspaceStop APIKeyScope = "workspace:stop"
APIKeyScopeWorkspaceUpdate APIKeyScope = "workspace:update"
)
// PublicAPIKeyScopes lists all public low-level API key scopes.
var PublicAPIKeyScopes = []APIKeyScope{
APIKeyScopeApiKeyAll,
APIKeyScopeApiKeyCreate,
APIKeyScopeApiKeyDelete,
APIKeyScopeApiKeyRead,
APIKeyScopeApiKeyUpdate,
APIKeyScopeCoderAll,
APIKeyScopeCoderApikeysManageSelf,
APIKeyScopeCoderApplicationConnect,
APIKeyScopeCoderTemplatesAuthor,
APIKeyScopeCoderTemplatesBuild,
APIKeyScopeCoderWorkspacesAccess,
APIKeyScopeCoderWorkspacesCreate,
APIKeyScopeCoderWorkspacesDelete,
APIKeyScopeCoderWorkspacesOperate,
APIKeyScopeFileAll,
APIKeyScopeFileCreate,
APIKeyScopeFileRead,
APIKeyScopeTemplateAll,
APIKeyScopeTemplateCreate,
APIKeyScopeTemplateDelete,
APIKeyScopeTemplateRead,
APIKeyScopeTemplateUpdate,
APIKeyScopeTemplateUse,
APIKeyScopeUserReadPersonal,
APIKeyScopeUserUpdatePersonal,
APIKeyScopeUserSecretAll,
APIKeyScopeUserSecretCreate,
APIKeyScopeUserSecretDelete,
APIKeyScopeUserSecretRead,
APIKeyScopeUserSecretUpdate,
APIKeyScopeWorkspaceAll,
APIKeyScopeWorkspaceApplicationConnect,
APIKeyScopeWorkspaceCreate,
APIKeyScopeWorkspaceDelete,
APIKeyScopeWorkspaceRead,
APIKeyScopeWorkspaceSsh,
APIKeyScopeWorkspaceStart,
APIKeyScopeWorkspaceStop,
APIKeyScopeWorkspaceUpdate,
}