Open gzm55 opened 3 years ago
@mmalone Currently a combination of ACME and the X5C provisioners can be used to sign an SSH certificate:
step ca certificate internal.smallstep.com internal.crt internal.key
step ssh certificate --host --x5c-cert internal.crt --x5c-key internal.key internal.smallstep.com internal
The first command can use any provisioner, but let's say it uses ACME, so the HTTP challenge is validated, and the host is trusted. The second command creates a valid certificate, but the principal internal.smallstep.com
is not validated against the SANs in the certificate, so we would be able to use any principal.
@mmalone not only the hostname and ip principal should be verify, it is also better to verify the host and the pubkey pair.
@gzm55 One option is to verify the X509 SANs with the principals. The main problem is that we're not doing it right now. So we have a couple of options, making it configurable through templates (https://github.com/smallstep/certificates/issues/433), or make it mandatory using some provisioner configuration.
Hey @gzm55, assuming that we are able to deliver on #433, would that appropriately address your use case?
You won't be able to do the pubkey verification but we're not convinced that the pubkey verification would make the protocol any more secure.
@dopey if x5c provisioner can use the variables from acme cert via #433 in the templates, that could address that every server root could got a ssh host cert for his server. It is also appreciate to see more document for this use case.
The down side of acme method, imo, could be that the port 80/443 of some servers may be already used which blocks the http01 challenge of acme. Meanwhile, the new challenge only depend on the admin can access the server host private key to sign a cert. This way should have the same security as the acme way, but more native and general for ssh cert.
We've got a project on the roadmap that will enable the use of x5c variables in subsequent certificate templates. Once that project is complete we'll be able to document this process more completely (I'll open up a documentation request now).
I'll come back and update this issue once that project has been scheduled.
What would you like to be added
An automatic and secure private cloud provisioner based on an ACME-like chanllenge.
Why this is needed
jwk
private key or secretRationale
jwk
token securelyFlow proposal
600
JWT
Token:JWT
tokenstep ca certificate ...
to sign the ssh pubkey