Skip to content
← Back to release · 2.1.268
New features / v2.1.268

Warn on open gateway access controls

CHANGELOG · original

Added a startup warning for gateways when access_control.allow_cidrs is empty, and a one-time warning the first time a request arrives from a public address
Open official changelog ↗

Documentation

Documentation excerpt

Logs

The gateway writes two streams to stderr, both JSON-friendly:

  • Audit events: single-line JSON per security-relevant event. Pipe stderr to your log aggregator.

    The events emitted include config.load, session.mint, session.refresh, device.authorize, device.verify, device.callback, auth.denied, access.denied, access.public_client, inference, managed.serve, desktop_bootstrap.serve, desktop_bootstrap.denied, spend.blocked, admin.denied, admin.limit.upsert, and admin.limit.delete. Fields vary by event:

    • Successful mint and refresh events carry sub, email, client_ip, and the result
    • auth.denied and access.denied carry the reason and client IP, plus the request path for auth.denied, since no user identity exists at those denials. Two access.denied reasons change what the event carries:
      • xff_unparseable: the event also carries the X-Forwarded-For entry that couldn't be read
      • client_ip_unknown: the event carries no client IP, because the connection had no peer address while an access_control list was set
    • access.public_client carries the client IP of the first request per process to arrive from a public address while access_control.allow_cidrs is empty. The gateway serves the request as usual; the event signals that the gateway may be reachable from the public internet. See the access_control reference for what counts as public and for the recommended allow list.
    • inference records which upstream served the request and the response status
    • desktop_bootstrap.denied records a rejected Claude Desktop bootstrap fetch with the reason (not_configured, policy_not_opted_in, or no_policy_matched) and the user's identity
    • admin.denied records a rejected admin-API auth attempt with the client IP, method, path, and a reason, without the presented key material: invalid_key when an x-api-key was presented but matched no configured key, bearer_rejected when only an Authorization header was presented and it didn't verify as a gateway session in admin.admin_groups, or no_credentials when neither header was presented
  • Operational logs: human-readable [gateway]-prefixed lines for boot, warnings, and upstream errors. The CLAUDE_GATEWAY_LOG_LEVEL environment variable controls verbosity and accepts debug, info, warn, or error, with info as the default. At debug, each sign-in and refresh also logs the names, not the values, of the claims in the id_token, plus the names of the userinfo claims when userinfo_fallback supplied any, so you can diagnose email_claim and groups_claim settings without logging PII. It doesn't affect audit events, which are always emitted.

Documentation snapshot · 2026-09-23

Change details