Expand description
API authentication, per-listener authorization floors, origin policy, and token-file lifecycle. Authentication and browser-origin policy for the native JSON-RPC listeners.
A node serves two listeners. The internal listener is the operator’s control surface and
gates every route behind the Bearer token. The external listener is the surface peers dial to
perform the HTTP handshake: its nodeDid and answerOffer methods are public, while its
status and registry reads stay gated. The requirement for one request is the pure function
required(listener, body) = floor(listener) ⊔ class(body) over the join-semilattice
rings_rpc::method::AuthorizationClass; this module owns the listener floor and that
function, and the endpoint layer only applies its verdict.
Structs§
- ApiSecurity
- Immutable authentication and browser-origin policy shared by both listeners of one node.
- Loaded
ApiToken - An API authentication token loaded from its owner-only file.
Enums§
- ApiListener
- The two JSON-RPC listeners a native node serves, distinguished by their authorization floor.
- ApiSecurity
Error - Errors raised while configuring API authentication or managing its token file.
Functions§
- load_
api_ token - Resolve and load the configured API token without creating a missing file.
- load_
api_ token_ file - Load and validate a token from an explicit file path.
- load_
or_ create_ api_ token - Resolve and load the configured API token, creating a random owner-only token if absent.