Skip to content

Template for Extra DN names #1258

Answered by maraino
bagasme asked this question in Q&A
Feb 5, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @bagasme, there are different ways you can do this:

  1. If you want to templatize all your certificates with the same DNs the best thing is to edit your ca.json and add inside the authority object a new template object like this:
{
  "...": "...",
  "authority": {
    "template": {
      "country": "US",
      "organization": "Smallstep",
      "organizationalUnit": "Smallstep Eng",
      "locality": "San Francisco",
      "province": "California",
      "streetAddress": "1 The Street St",
      "postalCode": "12345"
    },
    "...": "..."
  }
}
  1. If you want to copy the Subject in your CSR then you need a provisioner template like this:
{
	"subject": {{ toJson .Insecure.CR.Subject }},
…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@bagasme
Comment options

Answer selected by bagasme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants