* feat(comfy): support custom headers and per-request seed randomization Local-mode ComfyUI requests only ever sent Content-Type, so a local instance reachable behind HTTP auth (Basic auth, a bearer token) had no way to authenticate. Add a generic headers config key, merged over the plugin's own headers -- same shape as the ollama plugin's established remote.headers pattern, rather than inventing a comfy-specific scheme. Also add optional seedNodeId/seedInputName: without it, a static workflow file's sampler seed never changes between submissions, so every generation was silently identical whenever the operator's workflow relies on a fresh random seed per run. * fix(comfy): resolve headers through the SecretInput path, not plaintext-only The new headers config accepted only literal strings, so a credential-bearing value (Authorization for a gated ComfyUI instance) had no path to secret storage -- unlike the existing apiKey field, which already resolves through resolveSecretInputString with an env-backed fallback. Mirrors that same pattern per-header, plus the ollama plugin's established header-secret precedent: a header pointed at a SecretRef that can't be resolved fails the request outright instead of silently sending it unauthenticated. * fix(comfy): resolve non-env header SecretRefs, hide capability on unresolvable ones resolveComfyHeadersConfig only ever resolved env-sourced SecretRefs (a manual process.env fallback bolted onto inspect-mode); any file, keychain, or plugin-backed reference always threw, despite the schema and docs advertising the same SecretRef shape apiKey accepts. Now resolves through resolveConfiguredSecretInputString (the same async resolver the ollama plugin's own headers use) for the non-literal case, so a real non-env credential provider actually works. Separately, isComfyCapabilityConfigured returned true for local mode without ever inspecting headers, so an unavailable Authorization SecretRef advertised an image/video/music tool that would always throw on invocation. Extends the same sync inspect-based veto resolveComfyApiKey already applies for cloud mode's apiKey. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6 * fix(comfy): don't veto a resolvable non-env header secret from provider selection hasUnavailableComfyHeaderSecret treated any non-env SecretRef as unavailable for the isComfyCapabilityConfigured gate, on the theory that inspect mode can't confirm it -- but "can't confirm yet" isn't "won't resolve": the async request path can and does resolve a real file/keychain/plugin-backed ref. That made a perfectly valid, already-working header credential permanently hide the image/video/music tools from the agent, which is a worse outcome than a rare genuinely broken ref surfacing its error at actual invocation. Only a definitely missing/empty env var (decidable synchronously, no I/O) still vetoes. Added a permanent committed integration test (workflow-runtime.header-secrets.integration.test.ts) that proves this, plus the env/non-env header resolution and fail-closed paths, over real sockets with no SDK/ssrf-runtime mocking -- replacing the throwaway proof script from the previous push, which was deleted after running and therefore not rerunnable or reviewable. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6 * fix(comfy): register header SecretRefs in the plugin secret contract headers.* accepts and resolves SecretRef values, but the manifest never declared configContracts.secretInputs for that path -- the canonical plugin secret lifecycle (startup materialization, owner diagnostics, audit/configure discovery, resolved-value redaction) only walks manifest-declared paths, so this credential surface was invisible to all of it despite working correctly at request time. apiKey doesn't need the same declaration (it's covered by the separate, already-wired provider-auth system via setup.providers.envVars/providerAuthChoices); headers.* has no other declaration path. Also fixes two smaller findings from the same review pass: the seed-injection test asserted the freshly-generated seed is nonzero, but randomInt(RANDOM_SEED_EXCLUSIVE_MAX) legitimately can (rarely) return 0 -- a flaky assertion, removed; and documents that a configured Content-Type header is ignored specifically on image-upload requests, where the multipart boundary must come from the runtime. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6 * docs(secrets): register comfy header SecretRefs in the credential matrix The comfy plugin manifest change in e32863dc6cd registered plugins.entries.comfy.config.headers.* as a secret-input target, but the generated docs matrix and its paired markdown list weren't refreshed to match, breaking the docs-sync CI check. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6 * test(comfy): restore inherited header proof env * fix(comfy): redact reflected request credentials across generation failures Reuse the Ollama exact-header redactor through the provider HTTP SDK, scrub structured and truncated diagnostics before retaining them, and cover decoded Basic credentials observed in real ComfyUI proxy failures. Preserve optional header and seed behavior while consolidating tests and documenting the shared boundary. Co-authored-by: Markus Hartung <mail@hartmark.se> * fix(provider-http): handle optional Node header values safely Skip undefined HeaderRecord values allowed by Node types and document the intentional omission of unsafe parser causes in the lint exception. Actual credential and no-header error behavior remain unchanged. Co-authored-by: Markus Hartung <mail@hartmark.se> * test(comfy): explicitly stringify reflected proxy header values Keep the socket fixture compatible with the IncomingHttpHeaders union without changing its reflected-error behavior. Co-authored-by: Markus Hartung <mail@hartmark.se> * test(provider-http): register credential-safe parser error exception Track the intentional preserve-caught-error suppression in the explicit inventory: raw JSON parser causes can quote request credentials. The focused inventory and provider HTTP tests pass; runtime behavior is unchanged. --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
9.5 KiB
summary, read_when, title
| summary | read_when | title | |||
|---|---|---|---|---|---|
| Canonical supported vs unsupported SecretRef credential surface |
|
SecretRef credential surface |
This page defines the canonical SecretRef credential surface: which credential fields accept a SecretRef (env/file/exec/store-backed reference) instead of a raw secret value.
Scope:
- 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.
The lists below are generated from the source target registry and checked against docs/reference/secretref-user-supplied-credentials-matrix.json in CI; do not hand-edit entries.
Supported credentials
openclaw.json targets (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.*.apiKeymemory.search.remote.apiKeyagents.entries.*.tts.providers.*.apiKeyagents.entries.*.memory.search.remote.apiKeytalk.providers.*.apiKeytalk.realtime.providers.*.apiKeytts.providers.*.apiKeyplugins.entries.acpx.config.mcpServers.*.env.*plugins.entries.brave.config.webSearch.apiKeyplugins.entries.codex.config.appServer.authTokenplugins.entries.codex.config.appServer.headers.*plugins.entries.comfy.config.headers.*plugins.entries.exa.config.webSearch.apiKeyplugins.entries.firecrawl.config.webFetch.apiKeyplugins.entries.google-meet.config.realtime.providers.*.apiKeyplugins.entries.google.config.webSearch.apiKeyplugins.entries.google.config.webSearch.headers.*plugins.entries.imap.config.accounts.*.passwordplugins.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.parallel.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.authTokenplugins.entries.webhooks.config.routes.*.secretgateway.auth.passwordgateway.auth.tokengateway.remote.tokengateway.remote.passwordcron.webhookTokenchannels.telegram.botTokenchannels.telegram.webhookSecretchannels.telegram.accounts.*.botTokenchannels.telegram.accounts.*.webhookSecretchannels.slack.botTokenchannels.slack.appTokenchannels.slack.relay.authTokenchannels.slack.userTokenchannels.slack.signingSecretchannels.slack.accounts.*.botTokenchannels.slack.accounts.*.appTokenchannels.slack.accounts.*.relay.authTokenchannels.slack.accounts.*.userTokenchannels.slack.accounts.*.signingSecretchannels.sms.authTokenchannels.sms.accounts.*.authTokenchannels.buzz.authTagchannels.buzz.privateKeychannels.clickclack.tokenchannels.clickclack.accounts.*.tokenchannels.discord.tokenchannels.discord.pluralkit.tokenchannels.discord.voice.realtime.providers.*.apiKeychannels.discord.voice.tts.providers.*.apiKeychannels.discord.accounts.*.tokenchannels.discord.accounts.*.pluralkit.tokenchannels.discord.accounts.*.voice.realtime.providers.*.apiKeychannels.discord.accounts.*.voice.tts.providers.*.apiKeychannels.irc.passwordchannels.irc.nickserv.passwordchannels.irc.accounts.*.passwordchannels.irc.accounts.*.nickserv.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.nostr.privateKeychannels.zalo.botTokenchannels.zalo.webhookSecretchannels.zalo.accounts.*.botTokenchannels.zalo.accounts.*.webhookSecretchannels.googlechat.serviceAccountchannels.googlechat.accounts.*.serviceAccount
SQLite auth-profile targets (secrets configure + secrets apply + secrets audit)
profiles.*.keyRef(type: "api_key"; unsupported whenauth.profiles.<id>.mode = "oauth")profiles.*.tokenRef(type: "token"; unsupported whenauth.profiles.<id>.mode = "oauth")
Node-host connection targets
gateway.cloudflareAccess.clientIdgateway.cloudflareAccess.clientSecret
These fields live in the node host's canonical nodeHost.config SQLite
machine-state value,
not openclaw.json. They accept the same SecretInput forms and resolve through
the configured SecretRef providers when the node starts. The conventional
CF_ACCESS_CLIENT_ID / CF_ACCESS_CLIENT_SECRET fallback persists env refs for
these fields automatically. They are not targets for secrets configure or
secrets apply.
Notes:
- Store refs use names matching
^[A-Z][A-Z0-9_]{0,127}$and resolve only from the Gateway-wide team scope in this release. A typical ref is{"source":"store","provider":"default","id":"OPENAI_API_KEY"}. - Auth-profile plan targets require
agentId; plan entries targetprofiles.*.key/profiles.*.tokenand write sibling refs (keyRef/tokenRef). Auth-profile refs are included in runtime resolution and audit coverage. - In
openclaw.json, SecretRefs must use structured objects such as{"source":"env","provider":"default","id":"DISCORD_BOT_TOKEN"}. Legacysecretref-env:<ENV_VAR>marker strings are rejected on SecretRef credential paths; runopenclaw doctor --fixto migrate valid markers. - OAuth policy guard:
auth.profiles.<id>.mode = "oauth"cannot be combined with SecretRef inputs for that profile. Startup/reload and auth-profile resolution fail fast when this policy is violated. - For SecretRef-managed model providers, generated
agents/*/agent/models.jsonentries persist non-secret markers (not resolved secret values) forapiKey/header surfaces. Marker persistence is source-authoritative: OpenClaw writes markers from the active source config snapshot (pre-resolution), not from resolved runtime secret values. - Cold Gateway startup can isolate retryable resolution failures for mapped, non-Gateway owners. Current mapped classes include model providers and skills, media/TTS/cron providers, eligible auth profiles, per-agent memory, sandbox SSH, channel accounts, and manifest-declared plugin routes. Startup keeps each failed owner's explicit refs in the runtime snapshot, reports the owner through status and doctor, and rejects requests for that owner without trying lower-precedence credentials. Reload and config-write preflight use the same owner-aware policy: healthy owners refresh; an eligible failed owner stays stale only when its ref identities, provider definitions, and complete non-secret owner contract are unchanged; a new or changed failure becomes cold. Gateway ingress auth, structurally invalid refs or values, fail-closed owners, and currently unmapped owners remain strict.
- For web search: in explicit provider mode (
tools.web.search.providerset), only the selected provider key is active. In auto mode (tools.web.search.providerunset), only the first provider key that resolves by precedence is active, and non-selected provider refs are treated as inactive until selected. Provider credentials useplugins.entries.<plugin>.config.webSearch.*. - Slack
identity: "user"useschannels.slack.userTokenwithchannels.slack.appTokenfor Socket Mode orchannels.slack.signingSecretfor HTTP mode. The same pairing applies underchannels.slack.accounts.*; no bot token is required for this identity.
Unsupported credentials
These credentials are minted, rotated, session-bearing, or OAuth-durable classes that do not fit read-only external SecretRef resolution:
hooks.tokenhooks.gmail.pushTokenhooks.mappings[].sessionKeyauth-profiles.oauth.*channels.discord.threadBindings.webhookTokenchannels.discord.accounts.*.threadBindings.webhookTokenchannels.whatsapp.creds.jsonchannels.whatsapp.accounts.*.creds.json