feat: add openbao:// KMS URI support (SECURESIGN-5076) - #2186
Conversation
PR Summary by QodoAdd openbao:// KMS URI support and centralize shared KMS type
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2186 +/- ##
==========================================
- Coverage 57.61% 57.60% -0.01%
==========================================
Files 288 288
Lines 16011 16044 +33
==========================================
+ Hits 9224 9242 +18
- Misses 5831 5847 +16
+ Partials 956 955 -1
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:
|
Code Review by Qodo
1.
|
|
/retest |
1 similar comment
|
/retest |
| // Used by TSA and Fulcio signer backends. | ||
| // XValidation is also present on RekorSigner.KMS (string field) in rekor_types.go. |
There was a problem hiding this comment.
do not comment where it is used and where it is validated - the comment is propagated into API desc.
| // +kubebuilder:validation:XValidation:rule="self == 'secret' || self == 'memory' || self.matches('^awskms://.+$') || self.matches('^gcpkms://.+$') || self.matches('^azurekms://.+$') || self.matches('^hashivault://.+$')",message="KMS must be 'secret', 'memory', or a valid URI with a key path (e.g., awskms:///key-id)" | ||
| // - openbao://keyname | ||
| // +kubebuilder:validation:XValidation:rule="self == 'secret' || self == 'memory' || self.matches('^awskms://.+$') || self.matches('^gcpkms://.+$') || self.matches('^azurekms://.+$') || self.matches('^hashivault://.+$') || self.matches('^openbao://.+$')",message="KMS must be 'secret', 'memory', or a valid URI with a key path (e.g., awskms:///key-id)" | ||
| KMS string `json:"kms,omitempty"` |
There was a problem hiding this comment.
can we reuse the KMS struct instead of the plain string?
There was a problem hiding this comment.
It will be good to migrate Rekor to use same structures like TSA, CTlog and Fulcio for signer config
ae81d33 to
909966f
Compare
909966f to
beac9f9
Compare
@bouskaJ Yes, tested on ocp - signing and verification was successful |
beac9f9 to
9befd98
Compare
…ESIGN-5076) Add openbao:// as a valid KMS URI scheme alongside gcpkms://, azurekms://, hashivault://, and awskms:// in the shared KMS struct validation. Refactor Rekor signer from a flat KMS string to a struct-based pattern matching TSA/CTLog/Fulcio: Type enum (secret/memory/kms) + *KMS struct + *Auth, with CEL XValidation for mutual exclusion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9befd98 to
a44c399
Compare
What changed
openbao://as a valid KMS URI scheme for Rekor and TSA signer configurationKMSstruct fromtimestampauthority_types.gotocommon.go— it is used by both TSA and FulcioWhy
SECURESIGN-5076 — OpenBao (open-source Vault fork) is already supported by
sigstore/sigstoreas an alternative scheme for the hashivault KMS provider. The operator's CEL validation was rejecting validopenbao://URIs.KMSstruct lived in TSA types despite being shared across components — moved tocommon.goalongsideAuth,SecretKeySelector, and other shared types for discoverability.Note
PR #2184 (Fulcio KMS signer) uses the
KMSstruct — after this merges, #2184 needs a trivial rebase to pick up the new location incommon.go. Same package, no import changes.