You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 249ca20
Browse filesBrowse the repository at this point in the historyBrowse files
feat(auth): emit OCSF logon events for accepted gateway credentials
When a gateway replica accepts a credential for the first time, it now
emits an Informational OCSF Authentication event with status Success.
The caller's request proceeds exactly as before. The event records:
- Who: the principal (user, mTLS operator, sandbox, or gateway peer),
with the same user types as authorization denials.
- How: the authentication protocol (OpenID, mtls, sandbox_jwt,
compute_driver, or k8s_service_account).
- Where: the gRPC method of the request that logged on.
- Correlation: the caller's address and request ID, the same fields the
failure and denial events carry.
Every gRPC request authenticates, and an idle sandbox's supervisor polls
the gateway several times a minute, so an event per request would bury
user logons. Each credential therefore logs on once: later requests with
the same bearer token or client certificate emit nothing until the
credential has been in use for an hour, when it logs on again. The
replica's connections share this record, which holds up to 16,384
credentials and forgets the oldest early when full. It keys on a SHA-256
digest of the credential that authenticated the caller (the bearer
token, the operator's certificate, or the mTLS user's subject), so
headers the authenticator ignored cannot force new logons. Digests stay
in memory.
Requests admitted by allow_unauthenticated_users, or by a gateway with
no authentication configured, emit no success event, since no credential
was verified.
Refs #2912
Signed-off-by: Kris Hicks <[email protected]>
0 commit comments