pub struct CertChain {
pub agent_pubkey: [u8; 32],
pub metadata: AgentMetadata,
pub issuer: Issuer,
pub issuer_sig: SerdeSig,
}Expand description
The proof that this agent serves a specific user — directly (root) or through a chain of attenuating delegations.
Fields§
§agent_pubkey: [u8; 32]§metadata: AgentMetadata§issuer: IssuerWho signed this cert: the root user, or a parent agent + its cert.
issuer_sig: SerdeSigThe issuer’s signature over (agent_pubkey || metadata_bytes).
Implementations§
Source§impl CertChain
impl CertChain
Sourcepub fn verify(&self) -> Result<()>
pub fn verify(&self) -> Result<()>
Verify the cert chain end to end.
- Root (
Issuer::User): the user’s key must have signed(agent_pubkey || metadata_bytes). - Delegated (
Issuer::Agent): the named parent pubkey must match the embedded parent cert, that parent cert must itself verify (rooting at a user), the parent agent’s key must have signed this cert, and this cert’s caveats must be⊑the parent’s (MeshError::CaveatAmplificationotherwise). Attenuation is thus enforced structurally at every link — a forged or tampered chain that amplifies authority is rejected even if each signature is valid.
Sourcepub fn verify_at(&self, current_generation: u64) -> Result<()>
pub fn verify_at(&self, current_generation: u64) -> Result<()>
Verify the cert chain against a known current generation (causal, not
wall-clock — §9.1). In addition to signature + attenuation at every link,
each link’s valid_for_generation must include current_generation, else
the chain is refused (MeshError::Generation). This is the authoritative
revocation axis: bumping the generation invalidates every cert scoped to an
earlier one, pull-based and without any wall-clock.
Sourcepub fn agent_fingerprint(&self) -> Fingerprint
pub fn agent_fingerprint(&self) -> Fingerprint
Fingerprint of the agent’s public key.
Sourcepub fn user_fingerprint(&self) -> Fingerprint
pub fn user_fingerprint(&self) -> Fingerprint
Fingerprint of the root user this cert chains up to (walking through any delegations). Unchanged for root certs.
Sourcepub fn root_user_pubkey(&self) -> UserPublic
pub fn root_user_pubkey(&self) -> UserPublic
The root user’s public key this cert chains up to.