🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.
Obtain a certificate normally (eg step ca certificate TestCert testcert.crt testcert.key)
The new certificate will have a correct Subject eg: Subject: DC=com,DC=example,DC=dc,OU=Domain Controllers,CN=TestCert
Renew certificate with step (eg step ca renew --force testcert.crt testcert.key)
The resulting certificate will be missing any ExtraNames golang does not support (in this example the renewed certificate has Subject: OU=Domain Controllers,CN=TestCert
Additionally Subject order is not preserved, so in some cases you may get Subject: CN=TestCert,OU-Domain Controllers
Your Environment
OS - Linux
step-ca Version - Smallstep CA/0.23.0-rc.1 (linux/amd64)
Expected Behavior
Subject should be preserved
Actual Behavior
Subject is re-written with missing ExtraNames
Additional Context
I had a quick look through the code and couldnt see a quick fix for this one, it seems step-ca parses the certificates using x509 pretty early on and then copies the Subject across, which is missing the ExtraNames
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
Steps to Reproduce
Create a new provisioner with a template that has ExtraNames in the Subject, eg:
step ca certificate TestCert testcert.crt testcert.key
)Subject: DC=com,DC=example,DC=dc,OU=Domain Controllers,CN=TestCert
step ca renew --force testcert.crt testcert.key
)Subject: OU=Domain Controllers,CN=TestCert
Additionally Subject order is not preserved, so in some cases you may get
Subject: CN=TestCert,OU-Domain Controllers
Your Environment
step-ca
Version - Smallstep CA/0.23.0-rc.1 (linux/amd64)Expected Behavior
Subject should be preserved
Actual Behavior
Subject is re-written with missing ExtraNames
Additional Context
I had a quick look through the code and couldnt see a quick fix for this one, it seems step-ca parses the certificates using x509 pretty early on and then copies the Subject across, which is missing the ExtraNames
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).