Skip to main content

powdb_auth/
lib.rs

1//! `powdb-auth` — argon2id password hashing and a persisted user/role store.
2//!
3//! Provides PowDB's RBAC primitives: the [`role`] permission lattice, the
4//! [`hash`] argon2id password hashing, and the persisted [`store::UserStore`].
5//! These are live in production: `powdb-server` loads the [`store::UserStore`]
6//! at startup and enforces the [`role`] lattice on every query
7//! (`crates/server/src/handler.rs`), and `powdb-cli` manages users via the
8//! `useradd`/`passwd`/`userdel` subcommands.
9
10pub mod error;
11pub mod hash;
12pub mod role;
13pub mod store;
14
15pub use error::AuthError;
16pub use hash::{hash_password, verify_password};
17pub use role::{Permission, Role};
18pub use store::{User, UserStore};