Skip to content

Limit the allowed domains in certificate requests to be signed #382

Answered by dopey
dices asked this question in General
Discussion options

You must be logged in to vote

Hey, @dices, I was actually doing something just like this the other day. The answer is "yes, but ...".

  1. Yes! Here is a certificate template that you can use to generate an intermediate certificate:
	"subject": {{ toJson .Subject }},
	"keyUsage": ["certSign", "crlSign"],
	"basicConstraints": {
		"isCA": true,
		"maxPathLen": 0
	},
	{{/* All fields are optional, and all but "critical" can be a string or an array of strings */}}
	"nameConstraints": {
		"critical": true,
		"permittedDNSDomains": ["example.com"]
	}
}

The command to generate the intermediate might look like:

step certificate sign --template-file /Users/max/src/github.com/smallstep/step/.step/templates/certs/x509/intermediate…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tashian
Comment options

tashian Oct 5, 2020
Collaborator

@maraino
Comment options

@mmalone
Comment options

Answer selected by tashian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants