Can SSH user certificates be renewed? #1296
-
Hello!
SSH user cert renewalI would like documentation on how to renew SSH user certs in a similar way to how SSH host certificates are renewed: non-interactive and without any secrets other than having a signed cert and the corresponding key. This would allow short certificate lifetimes. Here's what I did find and why it does not meet my requirements:
I'd expect to find this in the documentation on how to renew SSH user certs in all of the following locations:
Some information about my use case, in case it is helpful:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 20 replies
-
Hey @anon8675309 👋 . Thanks for opening the issue! As you mentioned It has been a while since we made this decision but I'll do my best to remember our reasoning. X509 has a widely used process for revoking certificates - CRL. SSH has the KRL but at the time when we made this decision, KRLs were not widely used. I'd have to do some research to understand how common they are now and how well supported. A certificate that can renew itself using it's own private key is essentially a never expiring credential (especially when there is no easy to use system for revoking and checking revocation status). As a policy we prefer not to issue non-expiring credentials to users or workloads that generally only need that credential for a short period of time. When describing your use case you mention that your hosts need SSH user certificates (I assume for workflows that involve connecting to other hosts). Our philosophy for this use case is that these SSH User ("bot") certificates should be generated on demand when needed by workflows. One way to do this is by issuing the host a longer lived X509 certificate (using a Cloud Identity provisioner, a JWK provisioner, or a ACME Device Attestation provisioner) and then using this X509 certificate in the X5C provisioner to generate SSH user certificates on demand (this is a pattern we use in our hosted platform). We consider this X509 certificate the hosts "Identity" or "Device" Certificate. This Device Certificate can renew itself (you can set up a daemon to do this), and can generate X509 and SSH credentials for all the workloads that reside on the host. |
Beta Was this translation helpful? Give feedback.
-
Hi @anon8675309, the only way to renew an SSH certificate is using SSHPOP provisioner, and this is only enabled for host certificates. So the table that you mention incorrect, @tashian can you take a look to this. But you can re-use the same key to get a new certificate using any provisioner, for example like this:
|
Beta Was this translation helpful? Give feedback.
Hey @anon8675309 👋 . Thanks for opening the issue!
As you mentioned
step-ca
does not support renewing SSH user certificates (I'm not familiar w/ the Nebula provisioner so maybe @maraino can chime in as to why Nebula would be a special case here).It has been a while since we made this decision but I'll do my best to remember our reasoning. X509 has a widely used process for revoking certificates - CRL. SSH has the KRL but at the time when we made this decision, KRLs were not widely used. I'd have to do some research to understand how common they are now and how well supported. A certificate that can renew itself using it's own private key is essentially a never expiring credential (especi…