Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
axess
crates.io · docs.rs · Book · GitHub
Public API facade for the Axess authentication and authorization library for Axum.
This is the crate most applications should depend on. It re-exports the curated public surface from axess-core, axess-factors, axess-identity, and axess-macros through a single import path and decides the canonical module layout (axess::backends::{sqlite, postgres, mysql, valkey, memory}, axess::session::*, axess::middleware::*, etc.).
What you get
- Multi-factor authentication (password, TOTP, HOTP, email OTP, FIDO2, OAuth/OIDC, LDAP bind)
- Cedar Policy authorization (RBAC, ABAC, ReBAC)
- Session management with HMAC-signed cookies and optional AES-256-GCM encryption at rest
- Session binding, concurrent-session limits, forced logout via registry
- Workload identity (SPIFFE, K8s SA, GitHub Actions OIDC); unified
Principalwith humans - Token-bucket rate limiting per IP / user / tenant / header
- Metrics hooks (
AuthnMetrics) and health checks (HealthCheck,CompositeHealthCheck) - Deterministic simulation testing throughout (injectable RNG, clock, mock stores)
Quick start
[]
= { = "0.2", = ["sqlite", "authz"] }
use ;
use SessionStore as SqliteSessionStore;
use ;
use SqlitePool;
use ;
async
See examples/sqlite for a complete working application (login, signup, TOTP enrollment, route guards, rate limiting, health probes). For OAuth/OIDC, FAPI, FIDO2, and Cedar examples, see the sibling directories under examples/.
Feature flags
Default features ["authz", "device"] cover the most common build. Storage backends, federated authn protocols, and workload-identity resolvers are opt-in. See the workspace README for the full table.
Related crates
| Crate | Purpose |
|---|---|
| axess-core | Orchestrator: session/authn/authz flow, device identity, workload hub, delegated/OBO, storage, middleware |
| axess-factors | Verifier and protocol primitives: password/TOTP/HOTP, FIDO2, LDAP, OAuth/OIDC/JWT, mTLS, bearer |
| axess-identity | Typed identifiers and the Principal { Human, Workload } model |
| axess-macros | require_authn!, require_partial_authn!, require_authz! |
| axess-clock | Clock / MockClock, the time seam for deterministic simulation testing |
| axess-rng | SecureRng / MockRng, the entropy seam for deterministic simulation testing |
| axess-cache | TTL + LRU cache with single-flight, DST-friendly |
| axess-events | rkyv-serialisable audit-event payloads |
| axess-strings | Arc<str> interning |
Licence
Dual-licensed under MIT and Apache-2.0.
Security
See SECURITY.md for the production integration checklist and the private vulnerability-reporting channel.