Skip to main content

Module register

Module register 

Source
Expand description

Synapse-compatible shared-secret registration backend.

Pairs with the HTTP handlers in tuwunel_api::client::admin that serve /_synapse/admin/v1/register. Owns:

  1. the resolved shared secret (from registration_shared_secret or its _file companion);
  2. a short-lived in-memory nonce store with a 60-second TTL.

The nonce store lives in RAM rather than RocksDB on purpose: each entry’s useful lifespan is shorter than a single block-cache eviction tick, and the working set is bounded by NONCE_CAP regardless of traffic.

ConstantsΒ§

NONCE_CAP πŸ”’
NONCE_LENGTH πŸ”’
NONCE_TTL πŸ”’

FunctionsΒ§

drop_oldest πŸ”’
gc_expired πŸ”’
resolve_shared_secret πŸ”’

Type AliasesΒ§

Nonces πŸ”’