blindplane_access/lib.rs
1//! Signed enterprise access control for Blindplane.
2//!
3//! This crate provides application-neutral principals, administrator-signed
4//! role-key grants, default-deny capability policies, signed revocation state,
5//! and audit events encrypted for both an owning user and tenant administrators.
6//! Callers supply trusted issuer keys, current time, persistence, and identity
7//! onboarding. The library performs no network I/O and never treats an embedded
8//! issuer key as trusted by itself.
9//!
10//! Private-key operations and audit-event sealing are enabled by the default
11//! `client` feature. Disable default features for a server-safe build that can
12//! decode and validate signed access objects but cannot open role grants.
13//!
14//! Run `cargo run -p blindplane-access --example enterprise_access` for a
15//! complete user/admin flow.
16
17#![forbid(unsafe_code)]
18
19mod codec;
20mod error;
21#[cfg(feature = "client")]
22mod event;
23mod grant;
24mod policy;
25mod principal;
26mod revocation;
27mod signed;
28
29pub use codec::AccessValidationPolicy;
30pub use error::AccessError;
31#[cfg(feature = "client")]
32pub use event::{AuditContext, AuditEvent, AuditEventKind, open_audit_event, seal_audit_event};
33#[cfg(feature = "client")]
34pub use grant::RoleKeypair;
35pub use grant::{AccessGrant, GrantSpec, Permissions};
36pub use policy::{
37 CapabilityKind, CapabilityRule, Decision, Effect, PolicySpec, TenantPolicy, VerifiedPolicy,
38};
39#[cfg(feature = "client")]
40pub use principal::{AccessIssuer, PrincipalKeypair};
41pub use principal::{Principal, PrincipalKind, TrustedIssuer};
42pub use revocation::{RevocationSpec, RevocationState, VerifiedRevocation};
43
44/// Canonical access-object format version.
45pub const ACCESS_FORMAT_VERSION: u16 = 1;