feat: add PKCS#11/HSM signer support for Fulcio and CTLog - #2182
feat: add PKCS#11/HSM signer support for Fulcio and CTLog#2182sampras343 wants to merge 1 commit into
Conversation
PR Summary by QodoAdd PKCS#11/HSM signer backend for Fulcio and CTLog
AI Description
Diagram
High-Level Assessment
Files changed (34)
|
Code Review by Qodo
1.
|
30aaea8 to
1552696
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## sachin/feat/signer-auth #2182 +/- ##
===========================================================
+ Coverage 57.25% 57.84% +0.58%
===========================================================
Files 288 291 +3
Lines 16249 16693 +444
===========================================================
+ Hits 9304 9656 +352
- Misses 5978 6048 +70
- Partials 967 989 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1552696 to
b492fda
Compare
Re: PIN duplicated into config Secret (Qodo finding #4)Acknowledged — this is an upstream architectural requirement, not something we can change. The The generated config Secret is:
This is consistent with how other operators handle HSM PINs in protobuf configs (e.g., sigstore/scaffolding). Mitigating the blast radius further would require upstream changes to |
b492fda to
4145314
Compare
4145314 to
2237d6c
Compare
2237d6c to
91e8ff8
Compare
91e8ff8 to
738921c
Compare
738921c to
12327f0
Compare
42d36b4 to
3bed21c
Compare
|
Code review by qodo was updated up to the latest commit 3bed21c |
0c6827d to
4da6d90
Compare
73a1295 to
bcd9852
Compare
bcd9852 to
2a8b8fb
Compare
2a8b8fb to
f44f7c9
Compare
f44f7c9 to
099474a
Compare
b0241d9 to
6d96543
Compare
6d96543 to
08517a0
Compare
Add PKCS#11/HSM-backed signer support, enabling hardware security module integration for both Fulcio CA signing and CTLog STH signing. API changes: - FulcioPKCS11Config: ConfigRef, KeyConfig (ID/Label), CEL validation - CTlogPKCS11Config: PinSecretRef, PublicKeyRef, TokenLabel, ModulePath - Signer type enum extended to "file;pkcs11" on both components Controller changes: - ensure_pkcs11_config actions: validate secrets, content-hash drift detection, PKCS11Condition lifecycle - Deployment actions: signer-type dispatch, HSM volume/mount wiring, mode-switch cleanup with PKCS11Condition removal - server_config: PKCS11 protobuf config generation with null-byte separated content hash - Shared HSM helpers: EnsureHSMResources / CleanupHSMResources E2E test suite: - test/e2e/pkcs11/ with dedicated //go:build pkcs11 tag - SoftHSM prerequisites: key ceremony Jobs, log extraction, secrets - WithPKCS11Signer fixture for SecureSign CR builder - Makefile test-e2e-pkcs11 target + CI job in main.yml Signed-off-by: Sachin Sampras M <sampras343@gmail.com>
08517a0 to
7411315
Compare
Summary
Add PKCS#11 as a signer backend option for both Fulcio and CTLog, enabling hardware security module (HSM) integration for signing operations. Stacked on #2181 (Auth) and #2175 (Volumes).
API Changes
FulcioPKCS11Config:ConfigRef(crypto11 JSON secret),KeyConfig(ID + Label)CTlogPKCS11Config:PinSecretRef,PublicKeyRef,TokenLabel,ModulePathPKCS11 *field onFulcioSignerandCTlogSignerTypeenum extended tofile;pkcs11Controller Changes
ensurePKCS11Deployment:--ca=pkcs11ca, crypto11 config mount, CA cert mount, HSM volumes--pkcs11_module_patharg, PKCS#11 protobuf config generationType==filecheck (not!=pkcs11)Design Decisions
Persistencefield onCTlogPKCS11Config— users configure HSM token persistence viaspec.ctlog.volumesspec.initContainers, not operator-generatedReview Comments Addressed
(from PR #2128):
Test plan
go build ./...andgo vet ./...passDepends on: #2181
🤖 Generated with Claude Code