pub struct AppConfig {Show 19 fields
pub vta_did: Option<String>,
pub vta_name: Option<String>,
pub public_url: Option<String>,
pub resolver_url: Option<String>,
pub server: ServerConfig,
pub log: LogConfig,
pub store: StoreConfig,
pub messaging: Option<MessagingConfig>,
pub services: ServicesConfig,
pub auth: AuthConfig,
pub audit: AuditConfig,
pub vault: VaultConfig,
pub policy: PolicyConfig,
pub secrets: SecretsConfig,
pub trusted_presentation_verifiers: Vec<String>,
pub credential_holder_did: Option<String>,
pub hardened: HardenedConfig,
pub config_path: PathBuf,
pub unknown_keys: Vec<String>,
}Fields§
§vta_did: Option<String>§vta_name: Option<String>§public_url: Option<String>§resolver_url: Option<String>WebSocket URL of a remote DID resolver (network mode).
When set, the VTA uses the remote resolver instead of resolving locally.
Format: ws://host:port/did/v1/ws
In TEE mode, this points to the affinidi-did-resolver-cache-server
sidecar on the parent, bridged via vsock.
server: ServerConfig§log: LogConfig§store: StoreConfig§messaging: Option<MessagingConfig>§services: ServicesConfig§auth: AuthConfig§audit: AuditConfig§vault: VaultConfigVault lifecycle tuning (soft-delete grace window). Shared by the password vault and the credential store.
policy: PolicyConfigPolicy Decision Point settings (enforcement toggle).
secrets: SecretsConfig§trusted_presentation_verifiers: Vec<String>Verifier DIDs the holder auto-consents to when answering a
credential-exchange/query (present_or_defer’s ConsentPolicy). Any
verifier not listed defers to an out-of-band approval. Default empty
(defer everything) — a safe default; operators trust specific verifiers.
credential_holder_did: Option<String>The VTA-managed holder identity (a registered derived subject_did) the
VTA auto-accepts offered credentials for: when set, an inbound
credential-exchange/offer is answered with a request binding the new
credential to this DID. Default unset — the VTA does not accept
unsolicited offers (a safe default; opt in by naming the holder identity).
hardened: HardenedConfigNon-TEE hardened configuration: derive the storage-encryption key and JWT signing
key from the master seed at boot, keeping both secrets out of
config.toml. See hardened.rs for details.
config_path: PathBuf§unknown_keys: Vec<String>Dotted paths of keys present in the parsed config.toml that no
field of AppConfig claims — typos, removed/renamed settings, or
keys meant for a different section. Collected by load() (via
serde_ignored) and surfaced as advisory warnings in validate().
#[serde(skip)] so it never round-trips through the file itself.
We warn rather than reject (no deny_unknown_fields): an existing
deployment may legitimately carry a legacy/extra key, and a config
that boots fine today must keep booting (P0.9b).
Implementations§
Source§impl AppConfig
impl AppConfig
pub fn load(config_path: Option<PathBuf>) -> Result<Self, AppError>
Sourcepub fn validate(&self) -> Result<(), AppError>
pub fn validate(&self) -> Result<(), AppError>
Validate the loaded runtime config, called at daemon boot
(server::run). Catches misconfigurations that would otherwise
produce a half-started or misbehaving service — the setup wizard
validates its inputs, but a hand-edited config.toml never went
through that gate.
Conservative by design: it hard-errors only on values that are unambiguously broken (a present-but-empty URL, a zero retention window the sweeper can’t honour) and warns — never blocks — on cross-field advisories that a working deployment might legitimately have, so it can’t reject a config that boots fine today.
pub fn save(&self) -> Result<(), AppError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
fn deserialize_typed<S>(
_: &C,
deserializer: S,
) -> Result<T, <S as Deserializer<'de>>::Error>where
S: Deserializer<'de>,
impl<T, U> DeserializeTypedOwned<T> for Uwhere
U: for<'de> DeserializeTyped<'de, T>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
T.