pub struct AuthConfig {
pub token: String,
pub pass: Option<PassConfig>,
pub lys: Option<LysConfig>,
pub require_verified_worker: bool,
}Expand description
Connection authentication configuration.
A single shared bearer token compared (constant-time) against the auth_token
carried on every client Connect handshake. This is the table-stakes access
gate, not an ACL system: one token grants full access. Its absence (no [auth]
section) is open mode (ACCESS-010): the exchange listens on loopback only,
admits every connection whatever credential it presents, and asks Lys
nothing; [auth] makes it gated, and a gated exchange never falls back to
open.
Fields§
§token: StringShared secret token a client must present in its Connect handshake. Must
be non-empty when the [auth] section is present (an empty token is a
config validation error, since it would gate nothing).
pass: Option<PassConfig>Optional registry-minted pass verifier, additive beside the bearer.
lys: Option<LysConfig>The Lys pass as a second credential beside the wire pass (ACCESS-001
R2): when set, a Connect carrying a Lys pass record is verified
offline against the issuer’s published keys and decided per message.
require_verified_worker: boolRefuse every worker registration from a connection that proved no
holder (ACCESS-004 R3): a bearer connection, or one before any pass.
Off by default, so a worker that dials with the bearer, as aion’s does,
keeps registering; turning it on is the operator’s act, and it needs
[auth.pass], without which no connection could prove a holder.
Trait Implementations§
Source§impl Clone for AuthConfig
impl Clone for AuthConfig
Source§impl Debug for AuthConfig
The token is a credential: its Debug names its length only
(ACCESS-004 R5).
impl Debug for AuthConfig
The token is a credential: its Debug names its length only
(ACCESS-004 R5).