Skip to content

Custom certificate subjects #662

Answered by tashian
verement asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can do this with certificate templates. For example:

{
    "subject": {
        "organization": {{ toJson .Organization }},
        "commonName": {{ toJson .Subject.CommonName }},
        "organizationalUnit": {{ toJson .OrganizationalUnit }}
    },
    "sans": {{ toJson .SANs }},
    "keyUsage": ["digitalSignature"],
    "extKeyUsage": ["clientAuth", "serverAuth"]
}

You can then configure fixed values in the provisioner configuration:

        "options": {
                "x509": {
                        "templateFile": "templates/x509/server.tpl",
                        "templateData": {
                                "Organization": "Smallstep",
                            …

Replies: 1 comment 1 reply

Comment options

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

Answer selected by dopey
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