1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
//! VTA (Verifiable Trust Agent) service library.
//!
//! This is the shared business logic used by both the `vta` binary
//! (local/dev/cloud) and the `vta-enclave` binary (Nitro Enclave).
//!
//! Front-end binaries import this library and call `server::run()`
//! with the appropriate store backend and TEE context.
// Re-exported so front-end binaries (e.g. `vta-enclave`, which only depends
// on this crate) can install the rustls aws-lc-rs CryptoProvider at startup
// without taking a direct `vta-sdk` dependency.
pub use crypto_init;
/// Structured audit logging (the `audit!` tracing macro + audit-keyspace
/// persistence helpers), extracted to the `vta-audit` crate and re-exported so
/// every `crate::audit::{record,record_consent,…}` path and `audit!(…)` call
/// site is unchanged. The macro is `#[macro_export]`ed from `vta-audit`, so
/// `use crate::audit::{self, audit}` resolves the same as before.
pub use vta_audit as audit;
/// Background TTL sweepers (ACL grant expiry, pending-consent expiry,
/// soft-deleted-vault purge), extracted to the `vta-sweepers` crate and
/// re-exported so every `crate::{acl_sweeper,consent_sweeper,vault_sweeper}::…`
/// path (the storage-thread sweep loop, provision-integration) is unchanged.
pub use ;
/// Backup/restore subsystem, extracted to the `vta-backup` crate. The sealed
/// backup-bundle store + its TTL sweeper are re-exported so every
/// `crate::{backup_bundle_store,backup_bundle_sweeper}::…` path is unchanged;
/// the export/import operations are re-exported as `crate::operations::backup`
/// (see `operations/mod.rs`).
pub use ;
/// VTA configuration types, extracted to the `vta-config` crate. Re-exported as
/// `crate::config` so every `crate::config::…` path stays unchanged, and so
/// `vta_service::config` keeps resolving for `vta-enclave`. The `tee` cargo
/// feature gates the same `TeeConfig` / `TeeMode` items, wired to
/// `vta-config/tee` in `Cargo.toml`.
pub use vta_config as config;
/// Shared mid-layer services (trust-context store, sealed-transfer seal
/// helper, anti-replay nonce store), extracted to the `vta-support` crate and
/// re-exported so every `crate::{contexts,seal,sealed_nonce_store}::…` path is
/// unchanged.
pub use contexts;
/// DID-template storage (the `tpl:` keyspace), extracted to the `vta-support`
/// crate and re-exported so every `crate::did_templates::…` path is unchanged.
pub use did_templates;
/// Key management (master seed, BIP-32 derivation, wrapping, seed-store
/// backends), extracted to the `vta-keys` crate. Re-exported as `crate::keys`
/// so every `crate::keys::…` path stays unchanged and `vta_service::keys` keeps
/// resolving for `vta-enclave`. The seed-store backend features
/// (`aws-secrets` … `keyring`, `tee`) are wired to the matching `vta-keys/*`
/// features in `Cargo.toml`.
pub use vta_keys as keys;
/// Policy subsystem (regorus engine, default policy bundle, consent model,
/// decision evaluators), extracted to the `vta-policy` crate and re-exported so
/// every `crate::policy::…` path is unchanged.
pub use vta_policy as policy;
pub use seal;
pub use sealed_nonce_store;
/// TEE bootstrap subsystem (attestation providers, KMS attest/decrypt, the
/// anchor MAC, first-boot DID autogen), extracted to the `vta-tee` crate and
/// re-exported as `crate::tee` so `vta_service::tee::…` keeps resolving for
/// `vta-enclave` and every existing call site.
pub use vta_tee as tee;
/// Bridges the TEE first-boot DID auto-generation (`tee::did_autogen`) into the
/// `webvh` keyspace so `list_services`, the self-DID resolver preload, and
/// `/.well-known/did.jsonl` can find the serverless VTA's own DID record + log.
/// Transport-neutral Trust-Task dispatch subsystem. Both the REST route
/// (`routes::trust_tasks`-mounted `dispatch_trust_task`) and the DIDComm
/// `handle_trust_task` handler dispatch through `dispatch_trust_task_core`
/// here, so it lives at the crate root rather than under `routes::` (P2.4).
/// The holder credential vault, extracted to the `vta-vault` crate. Re-exported
/// as `crate::vault` so every `crate::vault::…` path (dispatch handlers, the
/// sweeper, `credential_exchange`) keeps resolving unchanged. The `bbs` /
/// `webvh` cargo features gate the same code they did before, wired through to
/// `vta-vault/bbs` and `vta-vault/webvh` in `Cargo.toml`.
pub use vta_vault as vault;
/// WebVH hosting infrastructure (DID-record store, hosting-server HTTP client,
/// and its DID-auth handshake), extracted to the `vta-webvh` crate and
/// re-exported so every `crate::{webvh_store,webvh_client,webvh_auth}::…` path
/// is unchanged. `webvh_didcomm` stays here — it depends on `didcomm_bridge`.
pub use ;
// `test_support` is gated internally on `any(test, feature = "test-support")`.
// `#[cfg(...)]` here would hide the module from the test builds that
// don't pass `--features test-support` explicitly; the module header
// handles that itself.
/// Initialize tracing/logging from config. Call once at startup before any
/// log output. Shared by all VTA front-end binaries.
/// Initialize tracing with a custom `MakeWriter`.
///
/// The enclave binary uses this to tee log output to both stderr and a
/// vsock connection for forwarding to the parent EC2 instance.