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/header. - استمرار العلامات موثوق من المصدر: يكتب OpenClaw العلامات من لقطة تهيئة المصدر النشط (قبل الحل)، وليس من قيم الأسرار المحلولة وقت التشغيل.
- بالنسبة إلى بحث الويب:
- في وضع الموفّر الصريح (عند ضبط
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 الخارجي للقراءة فقط.