axess-identity
Identity primitives for the Axess workspace.
Foundation crate, deliberately small: depends only on axess-rng (for the DST-injectable SecureRng trait), uuid, and thiserror. No tokio, no axum, no Cedar; axess-core layers session integration + Cedar entity emission on top of these primitives.
What's in here
- Typed identifiers;
TenantId,UserId,DeviceId,SessionId,EventId. AllFooId(Uuid)newtypes via thedefine_id!macro, with optionalserde/rkyv/sqlxderives gated by features on the umbrellaaxess-corecrate. - Principal abstraction; unified
Principal { Human, Workload }enum + the SPIFFE-shapedWorkloadId/TrustDomain/Issuertypes, plus the asyncPrincipalResolvertrait every inbound auth surface implements. Seedocs/workload-identity/README.mdfor the design rationale.
Usage
use ;
let tenant = new; // fresh v4 UUID
let user = new;
let parsed: TenantId = "0193...".parse?; // FromStr from hyphenated string
// Adopters can mint their own ID types:
define_id!;
Licence
Dual-licensed under MIT and Apache-2.0.