vti-common
Shared server-side infrastructure for VTA and VTC services in the Verifiable Trust Infrastructure workspace.
Overview
vti-common provides the foundational types and implementations shared across
the VTA and VTC service crates:
- Store abstraction --
StoreandKeyspaceHandleenum dispatch to either a local fjall embedded database or a vsock-proxied backend (for TEE enclaves). Both variants support transparent AES-256-GCM encryption via.with_encryption(). - Auth infrastructure -- JWT encoding/decoding (EdDSA / Ed25519), session
management, and axum
FromRequestPartsextractors (AuthClaims,ManageAuth,AdminAuth,SuperAdminAuth). - ACL --
AclEntry,Role, CRUD operations, and validation. - Error types --
AppErrorenum withIntoResponsefor consistent HTTP error handling. - Config types --
AuthConfig,LogConfig,StoreConfig,MessagingConfig,AuditConfigshared across services.
Feature Flags
| Feature | Default | Description |
|---|---|---|
encryption |
No | AES-256-GCM encryption for KeyspaceHandle.with_encryption() |
vsock-store |
No | VsockStore + VsockKeyspaceHandle (Linux only -- requires tokio-vsock) |
Usage
Add to your Cargo.toml:
[]
= "0.2"
# With encryption support
= { = "0.2", = ["encryption"] }
License
Apache-2.0