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.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.verificationTokenchannels.feishu.accounts.*.appSecretchannels.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)。 - 认证配置文件引用包含在运行时解析和审计覆盖中。
- 对于 SecretRef 管理的模型提供者,生成的
agents/*/agent/models.json条目对apiKey/header 部分保留非秘密标记(不解析秘密值)。 - 关于网络搜索:
- 在显式提供者模式(设置了
tools.web.search.provider)下,仅启用选定提供者的密钥。 - 在自动模式(未设置
tools.web.search.provider)下,tools.web.search.apiKey及提供者特定密钥均有效。
- 在显式提供者模式(设置了
不支持的凭证
范围外凭证包括:commands.ownerDisplaySecretchannels.matrix.accessTokenchannels.matrix.accounts.*.accessTokenhooks.tokenhooks.gmail.pushTokenhooks.mappings[].sessionKeyauth-profiles.oauth.*discord.threadBindings.*.webhookTokenwhatsapp.creds.json
- 此类凭证为铸造、轮换、持有会话特性或 OAuth 持久类,不适合只读的外部 SecretRef 解析。