Expand description
Synapse-compatible shared-secret registration backend.
Pairs with the HTTP handlers in tuwunel_api_admin that serve
/_synapse/admin/v1/register. Resolves the shared secret from
registration.shared_secret or its _file companion at each use and
maintains an 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.
Re-exportsΒ§
use std::collections::BTreeMap;πuse std::time::Duration;πuse std::time::Instant;πuse tuwunel_core::implement;πuse tuwunel_core::utils;πuse tuwunel_core::utils::Secret;πuse tuwunel_core::utils::is_secret_set;πuse tuwunel_core::utils::resolve_secret;π
ConstantsΒ§
- NONCE_
CAP π - NONCE_
LENGTH π - NONCE_
TTL π
FunctionsΒ§
- drop_
oldest π - gc_
expired π
Type AliasesΒ§
- Nonces π