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และเขียน ref ระดับพี่น้อง (keyRef/tokenRef) - ref ของโปรไฟล์การยืนยันตัวตนรวมอยู่ในการแก้ค่า ณ รันไทม์และขอบเขตการตรวจสอบ
- ใน
openclaw.jsonSecretRef ต้องใช้ออบเจ็กต์แบบมีโครงสร้าง เช่น{"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/header - การคงมาร์กเกอร์ยึดแหล่งที่มาเป็นหลัก: OpenClaw เขียนมาร์กเกอร์จากสแนปช็อตการกำหนดค่าแหล่งที่มาที่ใช้งานอยู่ (ก่อนการแก้ค่า) ไม่ใช่จากค่าความลับ ณ รันไทม์ที่แก้แล้ว
- สำหรับการค้นหาเว็บ:
- ในโหมดผู้ให้บริการแบบระบุชัดเจน (ตั้งค่า
tools.web.search.provider) เฉพาะคีย์ของผู้ให้บริการที่เลือกเท่านั้นที่ใช้งานอยู่ - ในโหมดอัตโนมัติ (ไม่ได้ตั้งค่า
tools.web.search.provider) เฉพาะคีย์ผู้ให้บริการตัวแรกที่แก้ค่าได้ตามลำดับความสำคัญเท่านั้นที่ใช้งานอยู่ - ในโหมดอัตโนมัติ ref ของผู้ให้บริการที่ไม่ได้เลือกจะถือว่าไม่ใช้งานจนกว่าจะถูกเลือก
- พาธผู้ให้บริการเดิม
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 ภายนอกแบบอ่านอย่างเดียว