mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
docs: refresh browser origin auth refs
This commit is contained in:
@@ -2699,6 +2699,9 @@ See [Plugins](/tools/plugin).
|
||||
- `gateway.auth.rateLimit`: optional failed-auth limiter. Applies per client IP and per auth scope (shared-secret and device-token are tracked independently). Blocked attempts return `429` + `Retry-After`.
|
||||
- `gateway.auth.rateLimit.exemptLoopback` defaults to `true`; set `false` when you intentionally want localhost traffic rate-limited too (for test setups or strict proxy deployments).
|
||||
- Browser-origin WS auth attempts are always throttled with loopback exemption disabled (defense-in-depth against browser-based localhost brute force).
|
||||
- On loopback, those browser-origin lockouts are isolated per normalized `Origin`
|
||||
value, so repeated failures from one localhost origin do not automatically
|
||||
lock out a different origin.
|
||||
- `tailscale.mode`: `serve` (tailnet only, loopback bind) or `funnel` (public, requires auth).
|
||||
- `controlUi.allowedOrigins`: explicit browser-origin allowlist for Gateway WebSocket connects. Required when browser clients are expected from non-loopback origins.
|
||||
- `controlUi.dangerouslyAllowHostHeaderOriginFallback`: dangerous mode that enables Host-header origin fallback for deployments that intentionally rely on Host-header origin policy.
|
||||
|
||||
@@ -377,6 +377,9 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
- Detailed deployment guidance is in [Trusted Proxy Auth](/gateway/trusted-proxy-auth#tls-termination-and-hsts).
|
||||
- For non-loopback Control UI deployments, `gateway.controlUi.allowedOrigins` is required by default.
|
||||
- `gateway.controlUi.allowedOrigins: ["*"]` is an explicit allow-all browser-origin policy, not a hardened default. Avoid it outside tightly controlled local testing.
|
||||
- Browser-origin auth failures on loopback are still rate-limited even when the
|
||||
general loopback exemption is enabled, but the lockout key is scoped per
|
||||
normalized `Origin` value instead of one shared localhost bucket.
|
||||
- `gateway.controlUi.dangerouslyAllowHostHeaderOriginFallback=true` enables Host-header origin fallback mode; treat it as a dangerous operator-selected policy.
|
||||
- Treat DNS rebinding and proxy-host header behavior as deployment hardening concerns; keep `trustedProxies` tight and avoid exposing the gateway directly to the public internet.
|
||||
|
||||
|
||||
@@ -109,11 +109,17 @@ Look for:
|
||||
Common signatures:
|
||||
|
||||
- `device identity required` → non-secure context or missing device auth.
|
||||
- `origin not allowed` → browser `Origin` is not in `gateway.controlUi.allowedOrigins`
|
||||
(or you are connecting from a non-loopback browser origin without an explicit
|
||||
allowlist).
|
||||
- `device nonce required` / `device nonce mismatch` → client is not completing the
|
||||
challenge-based device auth flow (`connect.challenge` + `device.nonce`).
|
||||
- `device signature invalid` / `device signature expired` → client signed the wrong
|
||||
payload (or stale timestamp) for the current handshake.
|
||||
- `AUTH_TOKEN_MISMATCH` with `canRetryWithDeviceToken=true` → client can do one trusted retry with cached device token.
|
||||
- `too many failed authentication attempts (retry later)` from a browser-origin
|
||||
loopback client → repeated failures from that same normalized `Origin` are
|
||||
locked out temporarily; another localhost origin uses a separate bucket.
|
||||
- repeated `unauthorized` after that retry → shared token/device token drift; refresh token config and re-approve/rotate device token if needed.
|
||||
- `gateway connect failed:` → wrong host/port/url target.
|
||||
|
||||
|
||||
@@ -136,7 +136,12 @@ flowchart TD
|
||||
Common log signatures:
|
||||
|
||||
- `device identity required` → HTTP/non-secure context cannot complete device auth.
|
||||
- `origin not allowed` → browser `Origin` is not allowed for the Control UI
|
||||
gateway target.
|
||||
- `AUTH_TOKEN_MISMATCH` with retry hints (`canRetryWithDeviceToken=true`) → one trusted device-token retry may occur automatically.
|
||||
- `too many failed authentication attempts (retry later)` from a localhost
|
||||
browser origin → repeated failures from that same `Origin` are temporarily
|
||||
locked out; another localhost origin uses a separate bucket.
|
||||
- repeated `unauthorized` after that retry → wrong token/password, auth mode mismatch, or stale paired device token.
|
||||
- `gateway connect failed:` → UI is targeting the wrong URL/port or unreachable gateway.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user