axess-core
Core implementation for the [Axess](https://github.com/GnomesOfZurich/axess authentication and authorization library: session state machine, multi-factor authentication engine, Cedar Policy evaluation, and pluggable storage backends.
Most applications should depend on the axess
facade crate instead. Use axess-core directly only if you're building a custom integration that needs internals the facade doesn't re-export.
Module layout
| Module | Contents |
|---|---|
authn/ |
IdentityStore / FactorStore, AuthnService, factor pipeline, OAuth/OIDC, JWT, device identity, audit, federation resolvers |
authz/ |
Cedar Policy evaluation, AuthzStore, PolicyStore, entity caches |
session/ |
SessionLayer, AuthSession, SessionStore, SessionRegistry, binding, crypto, refresh tokens, storage backends |
middleware/ |
RateLimitLayer, RequestIdLayer, TraceIdLayer, CSRF |
principal/ |
Principal { Human, Workload }, PrincipalResolver, Cedar entity bridge |
store/ |
Shared key/value-with-TTL store abstraction (Store<K, V>); per-backend value codecs live with each store impl |
workload/ |
Inbound workload-identity hub, outbound mTLS / OAuth clients |
health/, metrics/ |
HealthCheck, CompositeHealthCheck, AuthnMetrics |
testing/ |
MockIdentityStore, MockFactorStore, MockClock, MockRng, LocalIdpFixture (gated by testing feature) |
Usage
use ;
use SessionStore as SqliteSessionStore;
use SessionCrypto;
use ;
// SQLite-backed session store with AES-256-GCM at rest.
let key: = load_key_from_secrets;
let store = new;
store.init_schema.await?;
let signing_key: = load_signing_key;
let session_layer = new
.with_ttl;
let authn = new;
See the workspace README for the full integration walkthrough.
Feature flags
axess-core exposes a fine-grained feature set so adopters opt into only what they need. See Cargo.toml for the authoritative list, or the workspace README feature-flags table for the curated set of facade-relevant flags.
Licence
Dual-licensed under MIT and Apache-2.0.