Expand description
Building blocks shared by access providers, independent of any plugin host.
| Module | Purpose |
|---|---|
table | Table, the typed source a provider reads its records from and writes them to; MemoryTable built in code; Reloading, a cache that follows a table’s changes. |
hash | Use these with your own data: KeyHash, verify_key, PasswordHasher, verify_password, generate_key; self-describing sha256: and $argon2id$ strings. |
matcher | matcher::Matcher: a lookup’s claims to a directory account, by templates and LDAP filters with every value escaped. |
pins | pins::PinSource, a per-user pins::AuthorizedFile and a pins::TablePins: where an account’s pinned certificates live. |
pick | pick::pick: which account a credential’s named fields (a certificate’s SANs, subject, fingerprint) name. |
secret | Generate a prefixed 256-bit secret, hash it with optional domain separation, compare in constant time. |
file | Feature file: atomic private (0600) writes, bounded reads, change stamps, and FileTable, a table kept in one file in any serde format the caller supplies. |
The kit names no format. A table kept in a file takes the caller’s serde codec; a SQL
database or an HTTP API is a Table the caller implements. Nothing here reads a file or
an environment variable unless it is asked to.
Secret helpers report errors as plain Strings that never contain secrets; tables fail
with SourceError.
Re-exports§
pub use cache::CacheOptions;pub use cache::CacheSetting;pub use cache::Cached;pub use hash::Argon2Params;pub use hash::DEFAULT_MAX_PASSWORD_BYTES;pub use hash::KeyHash;pub use hash::PasswordHasher;pub use hash::generate_key;pub use hash::is_key_hash;pub use hash::is_password_hash;pub use hash::verify_key;pub use hash::verify_password;pub use record::RecordLimits;pub use table::Keyed;pub use table::MemoryTable;pub use table::Reloading;pub use table::Revision;pub use table::Snapshot;pub use table::SourceError;pub use table::Table;pub use table::Update;pub use table::UpdateOne;pub use table::check_field;pub use table::check_keys;pub use table::unix_now;
Modules§
- cache
- Short-lived caches in front of a directory or an authorizer, to absorb bursts.
- file
- Private files: written whole and atomically, read within a bound, told apart by stamp;
and
FileTable, aTablekept in one of them in a serde format the caller supplies through aCodec. - hash
- Keeping and checking secrets: bearer keys and passwords, as self-describing strings.
- matcher
- Tying the identity an authenticator obtained to an account in a directory.
- pick
- Choosing an account from the named fields of a credential, such as a certificate’s.
- pins
- Where the pins of an account are kept: the contract a matcher asks, and the two sources
that ship (a per-user file in
authorized, and anyTableof pins). - record
- Bounds on the fields of a record a provider keeps.
- secret
- Secrets that are made, not chosen, and what is kept of them.
- table
- Typed tables a provider reads and writes through, whatever keeps them.