Skip to main content

appcore_security/
lib.rs

1// =============================================================================
2//        #######
3//     ###       ###     F: lib.rs
4//    ##   ## ##   ##    P: AppCore-Runtime
5//         ## ##
6//                       C: 2026/05/29 20:47:35 by dnettoRaw
7//    ##   ## ##   ##    U: 2026/08/02 00:04:12 by dnettoRaw
8//      ###########      S: 1.0.1-rc.8
9// =============================================================================
10
11//! Security contracts for auth, policy, token trust, and secret boundaries.
12
13#![deny(missing_docs)]
14
15pub mod auth;
16pub mod dnt;
17pub mod hashtoken;
18pub mod policy;
19pub mod redaction;
20mod request_hash;
21pub mod secret;
22mod secret_file;
23mod secret_keyring;
24#[cfg(windows)]
25mod secret_keyring_windows;
26pub mod token;
27pub mod vault;
28
29pub use auth::{AuthContext, AuthDecision, Authenticator};
30pub use dnt::{DntSecretKeyProvider, DntSecretRefPolicy};
31pub use hashtoken::HashTokenProvider;
32pub use policy::{PolicyCheck, PolicyDecision};
33pub use redaction::redact_text;
34pub use secret::{
35    format_secret_material, new_rotated_secret, parse_secret_material, EnvSecretResolver,
36    PeerCredential, PeerCredentialProvider, SecretBytes, SecretFormatError, SecretResolver,
37    SecretStore, SecuritySecretMaterial, SecuritySecretMetadata, SecuritySecretRef,
38    SecuritySecretStatus, StaticPeerCredentialProvider, StaticSecretResolver,
39};
40pub use secret_file::FileSecretResolver;
41#[cfg(windows)]
42pub use secret_keyring::WINDOWS_DPAPI_USER_SECRET_KEYRING_FORMAT;
43pub use secret_keyring::{
44    FileSecretKeyring, SecretAccessError, SecretAccessResult, FILE_SECRET_KEYRING_FORMAT,
45};
46#[cfg(windows)]
47pub use secret_keyring_windows::WindowsDpapiSecretKeyring;
48pub use token::{
49    compute_request_hash, CommandTokenError, CommandTokenFactory, CommandTokenValidator,
50    RequestValidationDetails, RuntimeTokenClaims, SecurityError, SecurityResult, TokenClaims,
51    TokenProvider, DEFAULT_RUNTIME_TOKEN_TTL_MS, LOCAL_ADMIN_SUBJECT,
52};
53pub use vault::{Vault, VaultState};