Technical reference
SecretRef 認証情報サーフェス
このページは、正規の SecretRef 認証情報サーフェスを定義します。
スコープの意図:
- スコープ内: OpenClaw が発行またはローテーションしない、厳密にユーザーが提供する認証情報。
- スコープ外: ランタイムで発行される認証情報やローテーションされる認証情報、OAuth 更新用マテリアル、セッションに類するアーティファクト。
サポートされる認証情報
openclaw.json ターゲット (secrets configure + secrets apply + secrets audit)
models.providers.*.apiKeymodels.providers.*.headers.*models.providers.*.request.auth.tokenmodels.providers.*.request.auth.valuemodels.providers.*.request.headers.*models.providers.*.request.proxy.tls.camodels.providers.*.request.proxy.tls.certmodels.providers.*.request.proxy.tls.keymodels.providers.*.request.proxy.tls.passphrasemodels.providers.*.request.tls.camodels.providers.*.request.tls.certmodels.providers.*.request.tls.keymodels.providers.*.request.tls.passphraseskills.entries.*.apiKeyagents.defaults.memorySearch.remote.apiKeyagents.list[].tts.providers.*.apiKeyagents.list[].memorySearch.remote.apiKeytalk.providers.*.apiKeymessages.tts.providers.*.apiKeytools.web.fetch.firecrawl.apiKeyplugins.entries.acpx.config.mcpServers.*.env.*plugins.entries.brave.config.webSearch.apiKeyplugins.entries.exa.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.minimax.config.webSearch.apiKeyplugins.entries.tavily.config.webSearch.apiKeyplugins.entries.voice-call.config.realtime.providers.*.apiKeyplugins.entries.voice-call.config.streaming.providers.*.apiKeyplugins.entries.voice-call.config.tts.providers.*.apiKeyplugins.entries.voice-call.config.twilio.authTokentools.web.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.qqbot.clientSecretchannels.qqbot.accounts.*.clientSecretchannels.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.serviceAccountは兄弟のserviceAccountRef経由 (互換性の例外)channels.googlechat.accounts.*.serviceAccountは兄弟のserviceAccountRef経由 (互換性の例外)
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"の場合はサポートされません)
注記:
- 認証プロファイルのプランターゲットには
agentIdが必要です。 - プランエントリは
profiles.*.key/profiles.*.tokenをターゲットにし、兄弟の参照 (keyRef/tokenRef) を書き込みます。 - 認証プロファイルの参照は、ランタイム解決と監査カバレッジに含まれます。
openclaw.jsonでは、SecretRefs は{"source":"env","provider":"default","id":"DISCORD_BOT_TOKEN"}のような構造化オブジェクトを使用する必要があります。従来のsecretref-env:<ENV_VAR>マーカー文字列は、SecretRef 認証情報パスでは拒否されます。有効なマーカーを移行するにはopenclaw doctor --fixを実行してください。- OAuth ポリシーガード:
auth.profiles.<id>.mode = "oauth"は、そのプロファイルの SecretRef 入力と組み合わせることはできません。このポリシーに違反すると、起動/リロードと認証プロファイル解決は即座に失敗します。 - SecretRef 管理のモデルプロバイダーでは、生成される
agents/*/agent/models.jsonエントリは、apiKey/ヘッダーサーフェスについて、解決済みシークレット値ではなく非シークレットのマーカーを保持します。 - マーカーの永続化はソースを権威とします。OpenClaw は、解決済みのランタイムシークレット値ではなく、アクティブなソース設定スナップショット (解決前) からマーカーを書き込みます。
- Web 検索について:
- 明示的なプロバイダーモード (
tools.web.search.providerが設定されている) では、選択されたプロバイダーキーだけがアクティブです。 - 自動モード (
tools.web.search.providerが未設定) では、優先順位によって解決される最初のプロバイダーキーだけがアクティブです。 - 自動モードでは、選択されていないプロバイダー参照は、選択されるまで非アクティブとして扱われます。
- 従来の
tools.web.search.*プロバイダーパスは互換性期間中も解決されますが、正規の SecretRef サーフェスはplugins.entries.<plugin>.config.webSearch.*です。
- 明示的なプロバイダーモード (
サポートされない認証情報
スコープ外の認証情報には次が含まれます。
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 解決には適合しません。