Skip to content

localca: accept external signers and make CA generation configurable - #821

Open
haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:localca-signer
Open

localca: accept external signers and make CA generation configurable#821
haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:localca-signer

Conversation

@haiyanmeng

@haiyanmeng haiyanmeng commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

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.

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
haiyanmeng marked this pull request as draft August 10, 2026 15:58
@haiyanmeng
haiyanmeng marked this pull request as ready for review August 10, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant