Refine scoped API key capabilities

This commit is contained in:
wizardchen
2026-07-07 11:09:10 +08:00
committed by lyingbug
parent b5cc7d2a28
commit 2c6f082062
38 changed files with 1718 additions and 655 deletions
+44 -4
View File
@@ -5759,13 +5759,15 @@ export default {
apiKeys: 'API Keys',
apiKeysDesc: 'Create separate keys per integration and restrict operation permissions plus knowledge-base access.',
createApiKey: 'Create API Key',
createApiKeyDialogDesc: 'Set the access role and available knowledge bases.',
createApiKeyDialogDesc: 'Choose capabilities and the knowledge-base scope this key may use.',
noApiKeys: 'No API keys',
apiKeyName: 'Name',
apiKeyValue: 'API Key',
apiKeyNamePlaceholder: 'Example: MCP read-only access',
apiKeyNameRequired: 'Enter an API key name',
toggleApiKeyVisible: 'Show or hide API key',
apiKeyAccessMode: 'Access mode',
apiKeyScopedAccess: 'Scoped access',
apiKeyAccessRole: "Access role",
apiKeyAccessType: "Access type",
apiKeyAccessTypeHint: "\"Knowledge base\" operates within the KB scope at the permission level below; \"Tenant full\" additionally unlocks every tenant-level API such as models and data sources.",
@@ -5780,10 +5782,48 @@ export default {
accessRoleViewerDesc: "Query, search, and chat without modifying knowledge-base content.",
accessRoleContributorDesc: "Create, update, or delete knowledge-base content within the selected scope.",
accessRoleAdminDesc: "Manage knowledge bases, including destructive operations like clearing a KB, within the selected scope; no tenant-level configuration.",
accessRoleOwnerDesc: "Full access, equivalent to a tenant owner: may call every tenant-level API (models, vector stores, data sources, channels, ...). Not limited by knowledge-base scope.",
apiKeyKnowledgeScope: 'Knowledge bases',
accessRoleOwnerDesc: "Full access, equivalent to a tenant owner: may call every tenant-level API (models, vector stores, data sources, channels, ...). Not limited by knowledge-base scope.",
apiKeyCapabilities: 'Capabilities',
apiKeyCapabilityGroupKnowledge: 'Knowledge-base data',
apiKeyCapabilityGroupAutomation: 'Agents and integrations',
apiKeyCapabilityGroupTenant: 'Tenant configuration',
apiKeyCapabilitySelectGroup: 'Select all',
apiKeyCapabilityClearGroup: 'Clear',
capabilityTenantFull: 'Tenant full access',
capabilityTenantFullHint: 'Allow every tenant-level API, including models, vector stores, data sources and channels. Knowledge-base scope does not apply.',
capabilityRetrieve: 'Retrieve knowledge bases',
capabilityRetrieveHint: 'Read, query, and search data inside the selected knowledge-base scope. Does not create sessions or modify content.',
capabilityChat: 'Chat',
capabilityChatHint: 'Let this key hold conversations and manage its own sessions. Does not modify knowledge-base content.',
capabilityReadAgents: 'Read agents',
capabilityReadAgentsHint: 'List agents, read agent details, presets, and suggested questions. Does not allow chat or agent edits.',
capabilityIngest: 'Write KB content',
capabilityIngestHint: 'Let this key write content into its allowed knowledge bases (upload documents, edit chunks/FAQ/tags/wiki). It cannot create knowledge bases or agents, cannot clear a knowledge base, and stays bounded to the selected knowledge bases.',
capabilityManageKbs: 'Manage knowledge bases',
capabilityManageKbsHint: 'Let this key update or delete existing knowledge bases and change their initialization/configuration within the selected scope. It does not create new knowledge bases.',
capabilityManageAgents: 'Manage agents',
capabilityManageAgentsHint: 'Let this key create, update, delete and copy agents. Agent config can carry sensitive model/MCP bindings, so this is off by default — enable only when needed.',
capabilityMessageHistory: 'Message history',
capabilityMessageHistoryHint: 'Let this key search tenant chat history and read chat-history stats. It does not grant tenant configuration access.',
capabilityManageModels: 'Manage models',
capabilityManageModelsHint: 'Manage model definitions, credentials, connectivity checks, and WeKnoraCloud credentials.',
capabilityManageMcpServices: 'Manage MCP services',
capabilityManageMcpServicesHint: 'Manage MCP services, credentials, tool approval policies, and OAuth state for this principal.',
capabilityManageDatasources: 'Manage data sources',
capabilityManageDatasourcesHint: 'Manage data-source connectors, credentials, resource selection, and sync jobs. Knowledge-base scope still applies when a source is bound to a KB.',
capabilityManageChannels: 'Manage channels',
capabilityManageChannelsHint: 'Manage agent embed channels, IM channels, and WeChat QR binding flows.',
capabilityManageVectorStores: 'Manage retrieval infrastructure',
capabilityManageVectorStoresHint: 'Manage vector-store configuration plus parser, document reader, and storage engine connectivity checks.',
capabilityManageWebSearch: 'Manage web search',
capabilityManageWebSearchHint: 'Manage web-search provider configurations, credentials, and connection tests.',
capabilityRunEvaluations: 'Run evaluations',
capabilityRunEvaluationsHint: 'Run evaluation jobs and read evaluation results.',
capabilityManageTenantSettings: 'Manage tenant settings',
capabilityManageTenantSettingsHint: 'Read and update tenant-level integration settings such as API end-user identity mode, request header configuration, and tenant KV settings. Does not include API key management, member management, tenant deletion, or ownership transfer.',
apiKeyKnowledgeScope: 'Knowledge bases',
apiKeyKnowledgeScopePlaceholder: 'Leave empty to allow all knowledge bases',
apiKeyKnowledgeScopeOwnerHint: 'Owner is a full-access key; the knowledge-base scope does not apply to it.',
apiKeyKnowledgeScopeOwnerHint: 'Full-access keys are not limited by knowledge-base scope.',
allKnowledgeBases: 'All knowledge bases',
createdAt: 'Created',
actions: 'Actions',