pub struct AppConfig {Show 20 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 mediator_readiness: MediatorReadinessConfig,
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>§mediator_readiness: MediatorReadinessConfigStartup readiness gate + reconnect policy for the mediator DIDComm
connection: wait until the VTA’s own DID resolves over the network before
initiating the outbound mediator handshake, then keep the connection up.
See docs/02-vta/mediator-connection.md.
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.