Expand description
The two-header proxy auth and the mint schedule, on tokio’s clock in production.
Structs§
- Proxy
Auth - Mints, caches, and refreshes the proxy token for one MicroVM and one port.
- Proxy
Token - The minted token, as the control plane returns it: a map of header name to value.
- Tokio
Clock - The production clock: tokio’s monotonic clock and the system’s wall clock.
Constants§
- DEFAULT_
AGENT_ PORT - Compatibility alias for the shared daemon listener default.
- DEFAULT_
REFRESH_ AFTER - When to re-mint: half
MAX_TOKEN_LIFETIME. See the module docs for why not fifty-nine minutes. - MAX_
TOKEN_ LIFETIME - The ceiling the service enforces on a proxy token’s life. Not a choice.
- PROXY_
AUTH_ HEADER - The header carrying the minted JWE. One of the two keys read out of the
authTokenmap. - PROXY_
PORT_ HEADER - The header naming which of the token’s allowed ports this request targets.
- WS_
AUTH_ SUBPROTOCOL_ PREFIX - The prefix the JWE rides behind in a WebSocket handshake.
- WS_
PORT_ SUBPROTOCOL_ PREFIX - The prefix the target port rides behind in a WebSocket handshake.
- WS_
SUBPROTOCOL - The base subprotocol every MicroVM WebSocket handshake offers first.
Traits§
- Clock
- The clock a refresh boundary is measured on. It’s the crate’s one
Clock, and the production one is tokio’s (TokioClock, inmicrovms-edges): a token timed onstd::time::Instantwould never re-mint inside a simulation. Time, injectable so a wait or a refresh boundary is a test rather than a wait. - Token
Minter - Mints a proxy token. One method, so a test needs no AWS.