[pki] The Domi CA as a shared crate: signer interface, agent certificates, chain checks #1
Reference in New Issue
Block a user
Delete Branch "feature/ca-crate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Domi CA moved out of Ianitor core into this crate (Fabrica docs/32_coherence.md, T3a), so Fabrica can issue Legatus agent certificates without Ianitor.
What
Signertrait: the root is in Custos and signs through it (create_root,sign_intermediate); the crate never holds the root key.KeyPairimplements it for intermediates, tests and the offline machine. Every signature a signer returns is checked before a certificate leaves the crate.issue_agentfrom the agent's own CSR, URIurn:domi:agent:<team>:<agent>, 30 days, clientAuth).verify_chain/verify_server(rustls-webpki) andverify_agent(the Domi rules: agents intermediate, agent URI) with typed errors.Tests (first, 34): chains, expiry (leaf, intermediate, root), wrong issuer (another root with the same names, missing intermediate, self-signed, wrong intermediate), agents (device and server certificates are not agents, an agent made under Ianitor's intermediate is foreign, CSR wishes ignored, tampered and Ed25519 CSRs refused, ids checked), the signer (once per operation, impostor refused before signing, lying and declining signers caught, Ed25519 root end to end), hostile PEM/DER.
Self-review (adversarial)
verify_agentrequires the agent URI and the agents intermediate; tested both ways.verify_agentaccepts exactly leaf + one intermediate and re-checksissued_byon those two.Signer(T1's signing service has no X.509-TBS format yet: handover).