Skip to main content

exchange_ucan_verifier

Function exchange_ucan_verifier 

Source
pub fn exchange_ucan_verifier(
    _state: &OAuthState,
) -> Option<Box<dyn UcanVerifier + Send + Sync>>
Expand description

Construct the [UcanVerifier] the HTTP grant path uses to validate a presented UCAN’s signatures.

This is the S6↔trust-store seam. S8 (#574) wires it to the process-global PqTrustStore (the same register_pq_trust binding the rest of the TCB uses, installed via envelope::install_verify_config). The verifier resolves each UCAN issuer’s anchored ML-DSA-65 verifying key from that store and verifies the hybrid composite with require_pq = true (the Hybrid policy).

Returns None (→ the HTTP grant path denies every request, fail-closed) when no PQ trust store has been installed — a node that has not configured hybrid verification cannot validate hybrid-signed UCANs, and evaluate_grant never runs against an unverified chain.

The core evaluate_grant is exercised through its own tests with a real verifier, so the security-critical logic is covered independently of this wiring.