certificates
certificates copied to clipboard
Constrain lifetime of signed certificate by remaining lifetime of parent certificates.
- step-ca should transparently reduce the notAfter of any issued certificates to min(requested-notAfter, intermediate-notAfter, root-notAfter)
- If the notAfter is reduced, step-ca should log a warning: "Requested certificate expiration was reduced from <requested-notAfter> to <effective-notAfter> because leaf certificates cannot expire after [intermediate|root] certificate. You may need to issue a new [intermediate|root] with an extended lifetime."
- On CA startup, if now() + maxTLSCertDuration for any provisioner is >= <intermediate-notAfter> or >= <root-notAfter> we should log a warning: "Configured maxTLSCertDuration for provisioner
allows leaf certificate expirations after [intermediate|root] certificate expiration. Leaf certificate cannot outlive intermediate or root certificates. * * Certificate expirations will be automatically reduced to <effective-notAfter>. You may need to issue a new [intermediate|root] with an extended lifetime." - On the client side (in step), if the actual notAfter of the issued certificate doesn't match the requested notAfter, log a warning: "Issued certificate lifetime does not match requested lifetime. notAfter has been reduced to <notAfter>. Your CA may need a new [intermediate|root] with an extended lifetime."
From #381
We should combine this other validation going up the chain (e.g. name constraints).
For validity window we should only constrain to the issuing certificate. Since recursively this should work up the chain.
Should we attempt to verify the full chain that has been configured at step-ca init time?