Skip to main content

SecretRef 凭证范围

本页面定义了规范的 SecretRef 凭证范围。 范围意图:
  • 范围内:严格指用户提供且 OpenClaw 不会铸造或轮换的凭证。
  • 范围外:运行时铸造或轮换的凭证、OAuth 刷新凭据及类似会话的产物。

支持的凭证

openclaw.json 目标(secrets configure + secrets apply + secrets audit

  • models.providers.*.apiKey
  • models.providers.*.headers.*
  • skills.entries.*.apiKey
  • agents.defaults.memorySearch.remote.apiKey
  • agents.list[].memorySearch.remote.apiKey
  • talk.apiKey
  • talk.providers.*.apiKey
  • messages.tts.elevenlabs.apiKey
  • messages.tts.openai.apiKey
  • tools.web.search.apiKey
  • tools.web.search.gemini.apiKey
  • tools.web.search.grok.apiKey
  • tools.web.search.kimi.apiKey
  • tools.web.search.perplexity.apiKey
  • gateway.auth.password
  • gateway.auth.token
  • gateway.remote.token
  • gateway.remote.password
  • cron.webhookToken
  • channels.telegram.botToken
  • channels.telegram.webhookSecret
  • channels.telegram.accounts.*.botToken
  • channels.telegram.accounts.*.webhookSecret
  • channels.slack.botToken
  • channels.slack.appToken
  • channels.slack.userToken
  • channels.slack.signingSecret
  • channels.slack.accounts.*.botToken
  • channels.slack.accounts.*.appToken
  • channels.slack.accounts.*.userToken
  • channels.slack.accounts.*.signingSecret
  • channels.discord.token
  • channels.discord.pluralkit.token
  • channels.discord.voice.tts.elevenlabs.apiKey
  • channels.discord.voice.tts.openai.apiKey
  • channels.discord.accounts.*.token
  • channels.discord.accounts.*.pluralkit.token
  • channels.discord.accounts.*.voice.tts.elevenlabs.apiKey
  • channels.discord.accounts.*.voice.tts.openai.apiKey
  • channels.irc.password
  • channels.irc.nickserv.password
  • channels.irc.accounts.*.password
  • channels.irc.accounts.*.nickserv.password
  • channels.bluebubbles.password
  • channels.bluebubbles.accounts.*.password
  • channels.feishu.appSecret
  • channels.feishu.verificationToken
  • channels.feishu.accounts.*.appSecret
  • channels.feishu.accounts.*.verificationToken
  • channels.msteams.appPassword
  • channels.mattermost.botToken
  • channels.mattermost.accounts.*.botToken
  • channels.matrix.password
  • channels.matrix.accounts.*.password
  • channels.nextcloud-talk.botSecret
  • channels.nextcloud-talk.apiPassword
  • channels.nextcloud-talk.accounts.*.botSecret
  • channels.nextcloud-talk.accounts.*.apiPassword
  • channels.zalo.botToken
  • channels.zalo.webhookSecret
  • channels.zalo.accounts.*.botToken
  • channels.zalo.accounts.*.webhookSecret
  • channels.googlechat.serviceAccount 通过同级的 serviceAccountRef(兼容异常)
  • channels.googlechat.accounts.*.serviceAccount 通过同级的 serviceAccountRef(兼容异常)

auth-profiles.json 目标(secrets configure + secrets apply + secrets audit

  • profiles.*.keyReftype: "api_key"
  • profiles.*.tokenReftype: "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.ownerDisplaySecret
  • channels.matrix.accessToken
  • channels.matrix.accounts.*.accessToken
  • hooks.token
  • hooks.gmail.pushToken
  • hooks.mappings[].sessionKey
  • auth-profiles.oauth.*
  • discord.threadBindings.*.webhookToken
  • whatsapp.creds.json
理由:
  • 此类凭证为铸造、轮换、持有会话特性或 OAuth 持久类,不适合只读的外部 SecretRef 解析。