localca: accept external signers and make CA generation configurable - #821
Open
haiyanmeng wants to merge 1 commit into
Open
localca: accept external signers and make CA generation configurable#821haiyanmeng wants to merge 1 commit into
haiyanmeng wants to merge 1 commit into
Conversation
CA.SigningKey becomes a crypto.Signer rather than a crypto.PrivateKey, so a signer whose key material lives outside the process -- a KMS, an HSM, a PKCS#11 token -- can be substituted for a parsed one. Every consumer passes SigningKey to x509.CreateCertificate, which only calls Public and Sign, so nothing downstream changes. Such a signer cannot round-trip through Marshal; that case now reports itself instead of surfacing as x509's "unknown key type", which reads like a bug rather than a property of the signer. GenerateCA replaces GenerateED25519CA's fixed shape with options for key type, common name, permitted DNS domains and path length, and kubectl-ate admin make-ca-pool grows the corresponding flags. GenerateED25519CA stays as it was, so existing callers are untouched. Groundwork for the egress MITM CA, which needs an ECDSA P-256 root (Ed25519 support cannot be assumed in arbitrary actor sandboxes), a name constraint, and pathlen 1 for a delegated signing intermediate.
haiyanmeng
marked this pull request as draft
August 10, 2026 15:58
haiyanmeng
marked this pull request as ready for review
August 10, 2026 16:21
haiyanmeng
requested review from
Taahir Ahmed (ahmedtd),
Bowei Du (bowei) and
Max Thompson (thompsonmax)
August 10, 2026 16:22
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.
CA.SigningKey becomes a crypto.Signer rather than a crypto.PrivateKey, so a signer whose key material lives outside the process -- a KMS, an HSM, a PKCS#11 token -- can be substituted for a parsed one. Every consumer passes SigningKey to x509.CreateCertificate, which only calls Public and Sign, so nothing downstream changes. Such a signer cannot round-trip through Marshal; that case now reports itself instead of surfacing as x509's "unknown key type", which reads like a bug rather than a property of the signer.
GenerateCA replaces GenerateED25519CA's fixed shape with options for key type, common name, permitted DNS domains and path length, and kubectl-ate admin make-ca-pool grows the corresponding flags. GenerateED25519CA stays as it was, so existing callers are untouched.
Groundwork for the egress MITM CA (#823), which needs an ECDSA P-256 root (Ed25519 support cannot be assumed in arbitrary actor sandboxes), a name constraint, and pathlen 1 for a delegated signing intermediate.