SecretRef 凭证范围
本页面定义了规范的 SecretRef 凭证范围。 范围意图:- 范围内:严格限于 OpenClaw 不创建或轮换的用户提供的凭证。
- 范围外:运行时创建或轮换的凭证、OAuth 刷新材料以及类似会话的工件。
支持的凭证
openclaw.json 目标 (secrets configure + secrets apply + secrets audit)
models.providers.*.apiKeymodels.providers.*.headers.*skills.entries.*.apiKeyagents.defaults.memorySearch.remote.apiKeyagents.list[].memorySearch.remote.apiKeytalk.apiKeytalk.providers.*.apiKeymessages.tts.elevenlabs.apiKeymessages.tts.openai.apiKeytools.web.fetch.firecrawl.apiKeyplugins.entries.brave.config.webSearch.apiKeyplugins.entries.google.config.webSearch.apiKeyplugins.entries.xai.config.webSearch.apiKeyplugins.entries.moonshot.config.webSearch.apiKeyplugins.entries.perplexity.config.webSearch.apiKeyplugins.entries.firecrawl.config.webSearch.apiKeyplugins.entries.tavily.config.webSearch.apiKeytools.web.search.apiKeytools.web.search.gemini.apiKeytools.web.search.grok.apiKeytools.web.search.kimi.apiKeytools.web.search.perplexity.apiKeygateway.auth.passwordgateway.auth.tokengateway.remote.tokengateway.remote.passwordcron.webhookTokenchannels.telegram.botTokenchannels.telegram.webhookSecretchannels.telegram.accounts.*.botTokenchannels.telegram.accounts.*.webhookSecretchannels.slack.botTokenchannels.slack.appTokenchannels.slack.userTokenchannels.slack.signingSecretchannels.slack.accounts.*.botTokenchannels.slack.accounts.*.appTokenchannels.slack.accounts.*.userTokenchannels.slack.accounts.*.signingSecretchannels.discord.tokenchannels.discord.pluralkit.tokenchannels.discord.voice.tts.elevenlabs.apiKeychannels.discord.voice.tts.openai.apiKeychannels.discord.accounts.*.tokenchannels.discord.accounts.*.pluralkit.tokenchannels.discord.accounts.*.voice.tts.elevenlabs.apiKeychannels.discord.accounts.*.voice.tts.openai.apiKeychannels.irc.passwordchannels.irc.nickserv.passwordchannels.irc.accounts.*.passwordchannels.irc.accounts.*.nickserv.passwordchannels.bluebubbles.passwordchannels.bluebubbles.accounts.*.passwordchannels.feishu.appSecretchannels.feishu.encryptKeychannels.feishu.verificationTokenchannels.feishu.accounts.*.appSecretchannels.feishu.accounts.*.encryptKeychannels.feishu.accounts.*.verificationTokenchannels.msteams.appPasswordchannels.mattermost.botTokenchannels.mattermost.accounts.*.botTokenchannels.matrix.passwordchannels.matrix.accounts.*.passwordchannels.nextcloud-talk.botSecretchannels.nextcloud-talk.apiPasswordchannels.nextcloud-talk.accounts.*.botSecretchannels.nextcloud-talk.accounts.*.apiPasswordchannels.zalo.botTokenchannels.zalo.webhookSecretchannels.zalo.accounts.*.botTokenchannels.zalo.accounts.*.webhookSecretchannels.googlechat.serviceAccount通过同级serviceAccountRef(兼容性例外)channels.googlechat.accounts.*.serviceAccount通过同级serviceAccountRef(兼容性例外)
auth-profiles.json 目标 (secrets configure + secrets apply + secrets audit)
profiles.*.keyRef(type: "api_key")profiles.*.tokenRef(type: "token")
- Auth-profile 计划目标需要
agentId。 - 计划条目目标是
profiles.*.key/profiles.*.token并写入同级引用 (keyRef/tokenRef)。 - Auth-profile 引用包含在运行时解析和审计覆盖范围内。
- 对于由 SecretRef 管理的模型提供商,生成的
agents/*/agent/models.json条目会为apiKey/header 表面保留非机密标记(而非已解析的机密值)。 - 标记持久化以源为准:OpenClaw 从活动的源配置快照(解析前)写入标记,而非从已解析的运行时机密值写入。
- 对于 Web 搜索:
- 在显式提供商模式(设置了
tools.web.search.provider)下,仅所选的提供商密钥处于活动状态。 - 在自动模式(未设置
tools.web.search.provider)下,仅按优先级解析的第一个提供商密钥处于活动状态。 - 在自动模式下,未选中的提供商引用在被选中之前被视为非活动状态。
- 旧版
tools.web.search.*提供商路径在兼容期内仍可解析,但规范的 SecretRef 表面为plugins.entries.<plugin>.config.webSearch.*。
- 在显式提供商模式(设置了
不支持的凭据
范围外的凭据包括:commands.ownerDisplaySecretchannels.matrix.accessTokenchannels.matrix.accounts.*.accessTokenhooks.tokenhooks.gmail.pushTokenhooks.mappings[].sessionKeyauth-profiles.oauth.*discord.threadBindings.*.webhookTokenwhatsapp.creds.json
- 这些凭据属于动态生成、轮换、承载会话或 OAuth 持久化的类别,不符合只读外部 SecretRef 解析的要求。
本页面源自 openclaw/openclaw,由 BeaversLab 翻译,遵循 MIT 协议 发布。