Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Use
trusted-proxy1008 unauthorizedWhen
gateway.auth.mode = "trusted-proxy"Implications:
allowUsersgateway.trustedProxiesjson5{ gateway: { // Trusted-proxy auth expects requests from a non-loopback trusted proxy source by default bind: "lan", // CRITICAL: Only add your proxy's IP(s) here trustedProxies: ["10.0.0.1", "172.17.0.1"], auth: { mode: "trusted-proxy", trustedProxy: { // Header containing authenticated user identity (required) userHeader: "x-forwarded-user", // Optional: headers that MUST be present (proxy verification) requiredHeaders: ["x-forwarded-proto", "x-forwarded-host"], // Optional: restrict to specific users (empty = allow all) allowUsers: ["nick@example.com", "admin@company.org"], // Optional: allow a same-host loopback proxy after explicit opt-in allowLoopback: false, }, }, }, }
127.0.0.1::1gateway.auth.trustedProxy.allowLoopback = truegateway.trustedProxiesallowLoopbackgateway.auth.passwordOPENCLAW_GATEWAY_PASSWORDgateway.controlUi.allowedOriginsX-Forwarded-ForX-Forwarded-HostX-Forwarded-ProtoallowLoopback: truerequiredHeadersallowUsersUse one TLS termination point and apply HSTS there.
text* Good fit for internet-facing deployments. * Keeps certificate + HTTP hardening policy in one place. * OpenClaw can stay on loopback HTTP behind the proxy. Example header value: ```text} Strict-Transport-Security: max-age=31536000; includeSubDomains ```
text```json5} { gateway: { tls: { enabled: true }, http: { securityHeaders: { strictTransportSecurity: "max-age=31536000; includeSubDomains", }, }, }, } ``` `strictTransportSecurity` accepts a string header value, or `false` to disable explicitly.
max-age=300max-age=31536000includeSubDomainsOpenClaw rejects ambiguous configurations where both a
gateway.auth.tokenOPENCLAW_GATEWAY_TOKENtrusted-proxyIf you see a
mixed_trusted_proxy_tokengateway.auth.mode"token"Loopback trusted-proxy identity headers still fail closed: same-host callers are not silently authenticated as proxy users. Internal OpenClaw callers that bypass the proxy may authenticate with
gateway.auth.passwordOPENCLAW_GATEWAY_PASSWORDTrusted-proxy auth is an identity-bearing HTTP mode, so callers may optionally declare operator scopes with
x-openclaw-scopesExamples:
x-openclaw-scopes: operator.readx-openclaw-scopes: operator.read,operator.writex-openclaw-scopes: operator.admin,operator.writeBehavior:
x-openclaw-scopesoperator.writegateway.controlUi.allowedOriginsPractical rule: send
x-openclaw-scopesBefore enabling trusted-proxy auth, verify:
gateway.auth.trustedProxy.allowLoopbackx-forwarded-*gateway.controlUi.allowedOriginsgateway.auth.tokengateway.auth.mode: "trusted-proxy"gateway.auth.passwordopenclaw security auditThe audit checks for:
gateway.trusted_proxy_authtrustedProxiesuserHeaderallowUsersallowLoopbackIf you're moving from token auth to trusted-proxy:
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine