Repository navigation
cert: fleet cert foundation — domain, engine, core verbs (#9157) - #13720
Merged
Merged
Conversation
…me grammar, naming (#9157) Phase 1 first slice of the fleet CA program (#9155), spec phases B foundations (doc/2026-11-13T01-34-11Z_design_fleet_ca_credentials_secrets §§5.4, 6.3, 24.1, 26): - fleet-registry: Capability::Cert + the cert domain (alias pki in the argv0 map; fleet pki resolves to cert in the bin dispatch). - fleet bin: cert feature (full build only), dispatch + own-usage help carve-out following the search/bridge patterns. - New crates/fleet-cert library crate (library-first, §6.4): algorithm registry (ed25519, p256, rsa-4096 default set + ml-dsa-44 with RFC 9881 identifiers + rsa-2048 legacy-gated per §24.1(1); §6.3 alias grammar with dsa rejected as ambiguous), §5.4 time grammar (RFC3339 + Gregorian calendar durations with leap-day clamping), generation/partition naming (§5.2/§24.4). - CLI: fleet cert algorithms list|describe working end to end. ML-DSA-44 support is real, not stubbed: rcgen 0.14 + aws-lc-rs generates/signs it and OpenSSL 3.5.9 verifies the chains (probe evidence on #9157 lane record).
…9157) Library core of the Phase 1 slice (spec §§3, 5.4, 6.4, 7.1, 24): - graph: the cross-signing graph as data/policy — §3.2 root and §24.2 issuer edge tables plus the roots-only/issuers-direct/both/ none mode selector. The ML-DSA signer has no classical-subject edges; expected-inventory counts derive from the tables. - profile: leaf profiles mirroring pkgs/idp-pki idp-ca (server, client, saml-signing, oidc-signing — key algorithm, usages, EKU, default validity, server SAN-from-CN behaviour). - model: typed create/issue requests (signer source is a required request field, §24.3) and the fleet-cert-manifest/v1 bundle manifest schema (§7.1); algorithms x partitions slot resolution per §24.4 (Cartesian, or zipped repeats). - bundle: bundle directories with per-file SHA-256 index, strict verified loading, 0600 private keys, PEM/base64 codecs. - chain: x509-parser parsing + aws-lc-rs signature verification for all five registered algorithms; path building by raw-name + AKI/SKI with per-link cryptographic proof; validity/CA/pathlen checks; trust selections all/classical/pq with the §3.2 PQ-only path rule enforced at verification time. - engine: root set creation (self-signed roots + policy cross certificates + §3.5 trust bundles), issuer set creation (independent A/B keys, direct cross-signed variants, validity clamped to the signer's window), leaf issuance. Manifest records are parsed back from the issued DER, never copied from requests.
fleet cert (alias pki) verbs, each a thin shell over the library: root create|inspect|list|validate, issuer create|inspect|list, leaf issue|inspect|list, chain build|test, bundle inspect, profile list|show, algorithms list|describe, explain, doctor. Text and --json output throughout; exit codes follow the fleet contract (0/2/1). §24.3 enforced at the CLI boundary: issuer create requires --root-key-dir, leaf issue requires --issuer-key-dir, and root create must name its key destination (--private-store or --private-in-bundle) before generating anything. ML-DSA key reload: rcgen 0.14 cannot reload PQ keys (its PKCS#8 loaders have no PQ branch — the typed one panics), so the engine carries an MlDsa44Signer implementing rcgen's public SigningKey/PublicKeyData traits over aws-lc-rs PqdsaKeyPair. Reloaded ML-DSA roots/issuers sign through the same Issuer machinery as classical keys; verified live in the smoke run (issuer set with the exact §24.2 inventory: 8 keys, 26 certs).
…9157) tests/hierarchy.rs builds full synthetic hierarchies through the library API and checks them against named oracles: §§3.2/24.2 inventory arithmetic (13 root certs, 26 issuer certs, 8 keys), the crate validator, the system openssl as an independent implementation (classical, ML-DSA, and cross-signed paths), the §24.1 legacy gate and §24.3 signer-source rule, §5.4 validity clamping, and §7.1 manifest tamper rejection. The PQ negative test proves a classical leaf is rejected under PQ-only trust while an all-ML-DSA path validates. Chain building becomes iterative-deepening with path-length pruning: routing a P-256 issuer through a root cross-certificate puts 2 CA certificates below a pathlen:1 anchor — genuinely invalid — while the directly cross-signed issuer variant is shorter and valid. The search now finds the valid path instead of reporting whichever path fingerprint order surfaced first.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 23, 2026
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 foundation slice of the fleet CA program (#9155), under the
fleet certbuild-out tracker #9157. Spec: fleet architecture spec v0.3, §§3, 5.4, 6, 7.1, 24, 26.What lands
A new
fleet-certcrate wired into the fleet multicall as thecertdomain (aliaspki), library-first per §6.4 — every verb is a thin shell over the crate API.--not-afterXOR--valid-for); §24.4 generation/partition naming; §7.1 bundle manifest schema with a SHA-256 artifact index verified on load.GraphPolicyshared by root creation, issuer creation, inventory validation, and tests — including the asymmetry that ML-DSA signs no classical subject. Default root set: 4 keys → 13 certificates; default issuer set A+B: 8 keys → 26 certificates.root create|inspect|list|validate,issuer create|inspect|list,leaf issue|inspect|list,chain build|test,bundle inspect,profile list|show,algorithms list|describe,explain,doctor. Text +--json; fleet exit-code contract.pkgs/idp-pki's idp-ca: server, client, saml-signing, oidc-signing.SigningKey/PublicKeyDatatraits over aws-lc-rsPqdsaKeyPairfor reloaded ML-DSA signers.Proof
cargo test -p fleet-cert: 19 unit + 7 integration tests, each naming its oracle — spec inventory arithmetic, the crate validator, system OpenSSL as an independent implementation (classical, ML-DSA, and cross-signed paths all verify), the §24.1/§24.3 policy gates, §5.4 clamping, §7.1 tamper rejection, and a PQ-policy negative test (classical leaf rejected under PQ-only trust; all-ML-DSA path validates).cargo test -p fleet -p fleet-registrygreen (fleet bin 123+ tests incl. registry/help carve-outs).chain testunder all three trust selections, OpenSSL verification of built chains.Not in this slice
Filed as child issues under #9157: revoke/crl, ocsp, publish, dns, trust, key, format, profile validate/scaffold, algorithms benchmark/doctor, batch, inventory, renew/rotate verbs, bundle pack/unpack/diff/migrate.
Synthetic key material only; no production keys, no contact with the live IdP hierarchy. Refs #9157, #9155 — both stay open.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.