Skip to main content

install_envelope_verify_config

Function install_envelope_verify_config 

Source
pub(crate) fn install_envelope_verify_config(
    oauth: Option<&OAuthConfig>,
    config: Option<&HyprConfig>,
)
Expand description

Install the process-global envelope verify configuration (#152, #160).

MUST be called once at startup on every process entrypoint that serves RPC — the inproc daemon AND standalone service entrypoints (e.g. a lone worker). When uninstalled, global_verify_policy() fail-closes to Hybrid (#160), so a missing call here breaks mesh verification loudly rather than silently downgrading to EdDSA-only. install_verify_config is first-write- wins, so calling it from multiple stages within one process is harmless.

Policy is pinned to Hybrid (SNS nested COSE). With no anchored peer key the verifier fails closed (correct, by design). Install the process-global envelope verify configuration.

When oauth is Some, the kid-anchored PQ trust store is populated eagerly from mesh_peers (#157). When None (e.g. the standalone worker entrypoint, which has no config in scope), the store is empty — identical to the prior behavior. config carries the already-loaded CLI config so its explicit secrets path remains authoritative. Either way the store is immutable after install.