Module auth
Expand description
RPC inbound authentication: the daemon-side bundle of the provider
registry, the shared principal resolver, and the live local-identity
bindings, consumed by the initialize handshake and the per-method
authorization gate.
Credential routing (RFC 7141 Rev 8) is explicit:
- an
auth_tokenin the handshake selects the provider named byauth_provider, defaulting tonative(the pairing token) when unnamed — a fixed selection, never a scan across providers, and the selected provider’s denial is final; - with no token, a kernel-supplied peer credential routes to the one peercred provider;
- with neither, only a LOCAL connection with no
[users]roster configured keeps the legacy trusted path (the socket mode / pipe ACL is the credential). Once a roster exists, or on any remote connection, no credential means denial — never shared-operator fallback.
The compiled policy is generation-stamped: refresh_from_config swaps
the resolver policy and the uid roster together, so profile, mapping,
and roster edits reach established connections at their next privileged
operation.
Structs§
- Accepted
Auth State - The daemon’s inbound-auth layer: providers, resolver, and live local bindings. One instance per daemon generation, shared by every connection.
- Auth
Denied - A handshake or authorization denial, pre-mapped to its JSON-RPC error.
- Authority
Lease - The accepted authorization state and the paired-token set, held still by
RpcInboundAuth::hold_authority. - Connection
Auth - The authenticated state one connection holds after
initialize. Grants are a stamped resolution, not a snapshot: the gate re-resolves fromidentitywhenever the authorization generation moves. - RpcInbound
Auth - The daemon’s inbound-auth layer. The accepted state is a single snapshot: registry, resolver/generation, uid roster, and local trust posture are rebuilt and published together or not at all.
Enums§
- Local
Credential Evidence - Only non-secret, local authentication evidence retained on a connection.
Functions§
- validate_
accepted_ auth_ config - Prove that an authorization policy compiles, without a live auth layer in hand.