Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl: do not hand out certificates valid longer than root certificate #114

Closed
deep-42-thought opened this issue Jun 21, 2023 · 6 comments
Labels
enhancement New feature or request work_in_progress

Comments

@deep-42-thought
Copy link
Contributor

Maybe not really acme2certifier's responsibility, but:
Would it be ok to implement a limit on the "valid until" field, so that the server certificate is never valid longer than any other certificate in the certificate chain?
I filed a bug against letsencrypt, because they only check the validity of the server certificate and not of the whole chain. But they keep ignoring it somewhat, because the letsencrypt root ca does not have this issue (my root ca is relatively short-lived, and I often forget to update it >30 days before it expires).

I can look into implementing this, myself. But I wanted to hear your opinion on whether that would be a accepted feature, first.

@grindsa
Copy link
Owner

grindsa commented Jun 21, 2023

I agree that EE certificates should not have a longer validity times than the related intermediate certificates. But I see this rather in responsibility of the issuing CA to mandate this. Thus, the cleanest implementation would be inside the openssl handler and enforce the "valid until" field of an EE certificate to be always shorter than the CA certificates in the chain. Feel free to give it a try.. The feature makes sense and a patch will get accepted...

@grindsa grindsa added the enhancement New feature or request label Jun 21, 2023
@deep-42-thought
Copy link
Contributor Author

Thank you for the quick answer. Yes, I meant to implement it in the openssl handler. I'll see, when I have time to play around with it :)

@mpeylo
Copy link

mpeylo commented Jun 22, 2023

I agree that EE certificates should not have a longer validity times than the related intermediate certificates.

Cannot agree with such general statement. There might be use cases where that might make sense, e.g. when the issuing CA certificate is expected to be renewed (not "rekeyed") and keyIdentifier is used for AuthorityKeyIdentifier.

But I see this rather in responsibility of the issuing CA to mandate this.

Yep ;)

@grindsa
Copy link
Owner

grindsa commented Jun 23, 2023

I agree, there might be some valid use-cases. Thus, lets make it configurable. with default-setting turned off

@elipsion
Copy link

elipsion commented Sep 5, 2023

I agree that EE certificates should not have a longer validity times than the related intermediate certificates.

Cannot agree with such general statement. There might be use cases where that might make sense, e.g. when the issuing CA certificate is expected to be renewed (not "rekeyed") and keyIdentifier is used for AuthorityKeyIdentifier.

Are there any other automated CAs that does this? It seems highly niche, and will probably work so-so since the ACME protocol has no way of pushing an updated chain to the client when the issuing CA is renewed.

@grindsa
Copy link
Owner

grindsa commented Dec 17, 2023

Feature has been introduced in v0.32. Please add cert_validity_adjust: True into the CAandler section of your acme_srv.cfg and restart a2c. Thus, closing this issue...

@grindsa grindsa closed this as completed Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request work_in_progress
Projects
None yet
Development

No branches or pull requests

4 participants