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, andadmin.limit.delete. Fields vary by event:- Successful mint and refresh events carry
sub,email,client_ip, and the result auth.deniedandaccess.deniedcarry the reason and client IP, plus the request path forauth.denied, since no user identity exists at those denials. Twoaccess.deniedreasons change what the event carries:xff_unparseable: the event also carries theX-Forwarded-Forentry that couldn't be readclient_ip_unknown: the event carries no client IP, because the connection had no peer address while anaccess_controllist was set
access.public_clientcarries the client IP of the first request per process to arrive from a public address whileaccess_control.allow_cidrsis empty. The gateway serves the request as usual; the event signals that the gateway may be reachable from the public internet. See theaccess_controlreference for what counts as public and for the recommended allow list.inferencerecords which upstream served the request and the response statusdesktop_bootstrap.deniedrecords a rejected Claude Desktop bootstrap fetch with the reason (not_configured,policy_not_opted_in, orno_policy_matched) and the user's identityadmin.deniedrecords a rejected admin-API auth attempt with the client IP, method, path, and a reason, without the presented key material:invalid_keywhen anx-api-keywas presented but matched no configured key,bearer_rejectedwhen only anAuthorizationheader was presented and it didn't verify as a gateway session inadmin.admin_groups, orno_credentialswhen neither header was presented
- Successful mint and refresh events carry
-
Operational logs: human-readable
[gateway]-prefixed lines for boot, warnings, and upstream errors. TheCLAUDE_GATEWAY_LOG_LEVELenvironment variable controls verbosity and acceptsdebug,info,warn, orerror, withinfoas the default. Atdebug, 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 whenuserinfo_fallbacksupplied any, so you can diagnoseemail_claimandgroups_claimsettings without logging PII. It doesn't affect audit events, which are always emitted.
Documentation snapshot · 2026-09-23