step ca does not honor all attributes in x509 template #674
-
Using step-ca release 0.16. I want to create a 3-tier CA using step-ca. I have issued the Root and local Intermediate using x509 templates, with a MaxPathLen of respectively 2 and 1, and everything went as expected. Now the third level of the CA comes from another system.
The template contains the following:
The signing succesful, but I don't get what I expect. What is expected: The resulting certificate has the defined key usage and constraints. What I get:
I explicitly need to use In my understanding I'm doing everything right, and this appears to be a bug. Can you confirm? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @sephiroth1395, The template JSON file needs to be part of your CA configuration, you can't pass a template in via So, in your case, in your CA you'll want a template that looks sort of like this:
(I haven't tested this, but this is the idea.) |
Beta Was this translation helpful? Give feedback.
Hi @sephiroth1395,
The template JSON file needs to be part of your CA configuration, you can't pass a template in via
step ca sign
.What
--set-file
can be used for is a dictionary of key-value pairs that then can be accessed in the CA's template viaInsecure.User.*
variables.So, in your case, in your CA you'll want a template that looks sort of like this:
(I haven't tested this, but this is the idea.)
You put this into a .tpl file (somewhere like /etc/step-ca/templates/x509) and refer to it from y…