[PKI PR-014b] Implement RFC 7030 EST adapter - #60
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
atom-docs | e5fb49b | Commit Preview URL Branch Preview URL |
Aug 06 2026, 06:25 PM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0496b386b4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review the latest head after the resolved EST failure-observation and DER/PEM boundary regressions. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@arvindh123 please fix CI. @SammyOina please review. |
Objective
Implement PR-014b by exposing the existing subject-driven enrollment service through the RFC 7030 EST operations
cacerts,simpleenroll,simplereenroll,serverkeygen, andcsrattrs.Dependencies
a67967114a8f338a16dd31bff829c1cf578e9740).certificatescommit820854105d9cdd84d80155a7a6cf4b9151b7ea43.Changes
cmsimplementation.serverkeygento the existing generated-key issuance path and return a one-time PKCS#8 key inmultipart/mixed.CSRAttrs.cacerts.simpleenroll,simplereenroll, andserverkeygenthrough the existing structured audit/outbox path with non-sensitive EST metadata.The only supporting enrollment-service changes are transport-neutral entry points for existing generated issuance and applicable-profile CSR requirements; authorization, scope, issuer selection, profile selection, rate limits, persistence, and audit decisions remain outside the adapter.
Acceptance criteria validation
tests/m41_pki_est.rsinvokes GlobalSignestclientv1.0.7 forcacerts,enroll,reenroll, andserverkeygen; CI execution is pending.simplereenrollaccepts only the certificate being replaced and rejects expired or revoked credentials. The route accepts onlyVerifiedPeerCertificate; the integration test covers successful exact-leaf renewal plus revoked and database-expired rejection.cacertsmatches PR-003's trust bundle. The endpoint readsprovisioning::trust_bundle; the independent client decodes CMS and the test compares sorted SHA-256 certificate fingerprints.Mandatory tests
estclientv1.0.7 is pinned and built by CI.m41_pki_est.m41_pki_est.serverkeygenkey handling and one-time delivery: two independently parsed responses prove key/certificate matching, unique keys, and absence from persisted metadata.csrattrscorrectness: exact P-256 RFCCSRAttrsDER and applicable-profile requirements are asserted.cacertsagreement: independently decoded fingerprint sets are asserted.Local commands and results:
cargo fmt --check— PASS.cargo test --no-run --locked— PASS for all library, binary, and integration-test targets with the available Rust 1.92 nightly compiler.cargo test --lib certs::enrollment::est::tests --locked— PASS (3 tests, including the exact DER/PEM boundary).cargo test --lib --locked— PASS (163 passed, 11 ignored).cargo clippy --tests --locked -- -D warnings -A clippy::nonminimal_bool -A clippy::const_is_empty— PASS; the two allowances are local-only for newer-nightly findings in unchanged pre-existing code and are not present in source or CI.git diff --check— PASS.go install github.com/globalsign/est/cmd/estclient@v1.0.7with Go 1.26.5 — PASS.ATOM_EST_CLIENT=... DATABASE_URL=... cargo test --test m41_pki_est --locked -- --include-ignored --test-threads=1reached and applied all repository migrations against PGlite withpgcrypto, then stopped because PGlite's multiplexed connections reuse SQLx prepared-statement names. No EST assertion ran in that emulator. The test remains enabled and hosted CI supplies real PostgreSQL 16.Additional validation
Review corrections
audit::observe_erroronly on the serviceErrbranch. The PostgreSQL interoperability test forces failures in all three mutation routes and verifies event, outcome, transport, and mode without persisting CSR, certificate, or key material.Non-goals
No TLS-SRP, EST-over-CoAP, arbitrary EST operations, additional-path routing, ACME state, or client-selectable tenant/issuer/profile behavior was added.
Compatibility and risks