SecretRef Credential Surface
SecretRef credential surface
Section titled “SecretRef credential surface”This page defines the canonical SecretRef credential surface.
Scope intent:
- In scope: strictly user-supplied credentials that OpenClaw does not mint or rotate.
- Out of scope: runtime-minted or rotating credentials, OAuth refresh material, and session-like artifacts.
Supported credentials
Section titled “Supported credentials”openclaw.json targets (secrets configure + secrets apply + secrets audit)
Section titled “openclaw.json targets (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.providers.*.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.x_search.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.providers.*.apiKeychannels.discord.accounts.*.tokenchannels.discord.accounts.*.pluralkit.tokenchannels.discord.accounts.*.voice.tts.providers.*.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.accessTokenchannels.matrix.passwordchannels.matrix.accounts.*.accessTokenchannels.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.serviceAccountvia siblingserviceAccountRef(相容性例外)channels.googlechat.accounts.*.serviceAccountvia siblingserviceAccountRef(相容性例外)
auth-profiles.json 目標 (secrets configure + secrets apply + secrets audit)
Section titled “auth-profiles.json 目標 (secrets configure + secrets apply + secrets audit)”profiles.*.keyRef(type: "api_key"; 當auth.profiles.<id>.mode = "oauth"時不受支援)profiles.*.tokenRef(type: "token"; 當auth.profiles.<id>.mode = "oauth"時不受支援)
備註:
- Auth-profile plan targets 需要
agentId。 - Plan entries 以
profiles.*.key/profiles.*.token為目標並寫入 sibling refs (keyRef/tokenRef)。 - Auth-profile refs 包含在 runtime 解析和 audit coverage 中。
- OAuth policy guard:
auth.profiles.<id>.mode = "oauth"不能與該 profile 的 SecretRef 輸入結合使用。當違反此 policy 時,Startup/reload 和 auth-profile 解析會快速失敗。 - 對於 SecretRef 管理的 model providers,生成的
agents/*/agent/models.jsonentries 為apiKey/header surfaces 保留非機密標記(而非已解析的機密值)。 - Marker persistence 是 source-authoritative:OpenClaw 從來源配置快照(解析前)寫入標記,而不是從已解析的 runtime 機密值。
- 對於網路搜尋:
- 在明確 provider 模式下(設定
tools.web.search.provider),只有選定的 provider key 是啟用的。 - 在自動模式下(未設定
tools.web.search.provider),只有第一個按優先級解析的 provider key 是啟用的。 - 在自動模式下,未選定的 provider refs 在被選定之前被視為非啟用狀態。
- 舊版
tools.web.search.*provider paths 在相容視窗內仍然會解析,但標準的 SecretRef surface 是plugins.entries.<plugin>.config.webSearch.*。
- 在明確 provider 模式下(設定
不支援的憑證
Section titled “不支援的憑證”範圍外的憑證包括:
commands.ownerDisplaySecrethooks.tokenhooks.gmail.pushTokenhooks.mappings[].sessionKeyauth-profiles.oauth.*channels.discord.threadBindings.webhookTokenchannels.discord.accounts.*.threadBindings.webhookTokenchannels.whatsapp.creds.jsonchannels.whatsapp.accounts.*.creds.json
理由:
- 這些憑證是鑄造、輪換、承載會話或 OAuth 持久類別,不適合唯讀外部 SecretRef 解析。