pub fn verify_admin_bundle(
opened: OpenedArmored,
expect_digest: Option<&str>,
expected_vta_did: Option<&str>,
) -> Result<CredentialBundle, Box<dyn Error>>Expand description
Check that an opened bundle is anchored to the expected producer, then extract its admin credential.
HPKE sealing gives confidentiality, not authenticity: anyone who has seen the consumer’s bootstrap request can seal a bundle to it. A credential is only installed when something the operator trusts vouches for the bundle:
PinnedOnly: the out-of-band digest,expect_digest. The admin credentials thatpnm,cnmandvtaseal today all take this form, with a throwaway producerdid:key.DidSigned: a signature byexpected_vta_diditself. A valid signature from any other DID proves nothing, since anyone can mint adid:keyand sign, so the producer DID must equalexpected_vta_did, with or without a digest. Onlydid:keyproducers can be verified here; other methods would need DID resolution.Attested: refused. Attestation quotes are verified bypnm bootstrap connect, not on this path.
When expected_vta_did is given, the credential’s vta_did must also
equal it, so a bundle cannot point the session at a different VTA from the
one the operator named.