feat: add chat model config RBAC resource (#27957)

Add the `chat_model_config` RBAC resource, actions, and API key scopes.
This layer includes the scope migration and generated API types. Model
list queries apply token scopes, SQL authorization filters, and row
ACLs.

Write and default-management handlers keep deployment configuration
authorization until the next API layer replaces it.

Depends on #27956

_This pull request description was generated by Coder Agents._
This commit is contained in:
Ethan
2026-08-24 09:43:45 +00:00
committed by GitHub
parent ac41b5b4f9
commit cbe24a3da5
39 changed files with 1190 additions and 149 deletions
+7
View File
@@ -73,6 +73,13 @@ export const RBACResourceActions: Partial<
share: "share a chat with other users or groups",
update: "update chat title or settings",
},
chat_model_config: {
create: "create a new chat model config",
delete: "delete a chat model config",
read: "read chat model configs",
share: "share a chat model config with other users or groups",
update: "update a chat model config",
},
connection_log: {
read: "read connection logs",
update: "upsert connection log entries",
+16
View File
@@ -707,6 +707,12 @@ export type APIKeyScope =
| "chat:*"
| "chat:create"
| "chat:delete"
| "chat_model_config:*"
| "chat_model_config:create"
| "chat_model_config:delete"
| "chat_model_config:read"
| "chat_model_config:share"
| "chat_model_config:update"
| "chat:read"
| "chat:share"
| "chat:update"
@@ -953,6 +959,12 @@ export const APIKeyScopes: APIKeyScope[] = [
"chat:*",
"chat:create",
"chat:delete",
"chat_model_config:*",
"chat_model_config:create",
"chat_model_config:delete",
"chat_model_config:read",
"chat_model_config:share",
"chat_model_config:update",
"chat:read",
"chat:share",
"chat:update",
@@ -7885,6 +7897,7 @@ export type RBACResource =
| "boundary_log"
| "boundary_usage"
| "chat"
| "chat_model_config"
| "connection_log"
| "crypto_key"
| "debug_info"
@@ -7939,6 +7952,7 @@ export const RBACResources: RBACResource[] = [
"boundary_log",
"boundary_usage",
"chat",
"chat_model_config",
"connection_log",
"crypto_key",
"debug_info",
@@ -8093,6 +8107,7 @@ export type ResourceType =
| "api_key"
| "chat"
| "chat_instruction_settings"
| "chat_model_config"
| "convert_login"
| "custom_role"
| "git_ssh_key"
@@ -8133,6 +8148,7 @@ export const ResourceTypes: ResourceType[] = [
"api_key",
"chat",
"chat_instruction_settings",
"chat_model_config",
"convert_login",
"custom_role",
"git_ssh_key",