-
Notifications
You must be signed in to change notification settings - Fork 824
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
Add LETSENCRYPT_MIN_VALIDITY variable #485
Conversation
Considering LE rate limiting on this is 5 renewal / week for a given cert, 7655040 seconds (7776000 - ( ( 24 * 7 * 60 * 60 ) / 5 ) seems to be the highest sensible capping. 88 days / 7603200 seconds, ie taking a small security margin over LE rate limit and rounding it to the nearest whole day would also make sense. |
Yeah, originally I wanted to cap it to a lower value for the stated reasons, but then comes the problem of testing.
According to their site, what you are referring to are the Duplicate Certificate rate limits. But they also have a Renewal Exemption (which applies to Duplicate Certificates).
I also originally wanted to add also a lower bound, to prevent unwanted downtime due to misconfiguration, since the check is triggered hourly and the user could give a period smaller than 3600 seconds. But I wanted to first discuss this with you. |
My understanding is that Duplicate and Renewal are considered to be the same from a rate limit perspective:
So (from what I understood) each pre-existing discrete certificate (same set of domains) can be renewed up to five times a week. @cpu did I get this right ?
Rigth, I did not think about this. User adjustable |
From what I understood, the first 5 renewals count as Duplicates and the rest as normal renewals. (In the sense that Duplicate certificates can coexist [new key], but renewed certificates not [same key]).
Nevertheless I would be interested in what @cpu has to say.
Well, the thing is that LE CA always gives certificates with a lifespan of 90 days (not adjustable through simp_le). So even when adjusting Nevertheless I was about to suggest user adjustable |
Another idea would be to modify the Merry Christmas, btw (Or Happy Holidays) |
You might have mixed up things here, or I did. If the Maybe Regarding the improved support of other ACME CA I was about to answer that I'm not aware of any other CA offering free certificate through ACME v1 protocol with |
Oh, yes of course. That would work.
And according to them they give certificates with a lifetime of 180 days. |
Maybe it should be documented that this value is (for now) only adjustable for test purpose.
They also seems to have a limit of one domain per certificate:
So we'll probably have to add checks for that to if we intend to support this ACME CA as well. I'll do some tests with Buypass Go as soon as possible and we'll handle the "other ACME CA" compatibility in another, later PR. |
Did all the mentioned changes.
|
I'm okay with the lower bound too. 7200 seconds ? More ? |
The absolute minimum would be 3600 + worst case execution time of I will add the lower bound some time later today in this PR. |
Done |
@Greek64 thanks for the notification. I'm currently bed ridden due to flu, so merge will have to wait a bit. Don't want to merge stuff while my brain is half functional. Additionally I thought ~ one week ago that maybe the adjustable Your thought on this ? |
I'm sorry to hear that.
That seems indeed to be the cleanest way. Didn't even think of touching the Boulder... |
Although, now that I think about it again, we still have a problem. That means that all tests will get certificates with a validity of 88 days. If we want to make it with the boulder change we either have to add an exception code inside |
I'm catching up on email/github from the holiday period and only quickly skimmed this thread. Apologies if I'm misunderstanding something.
The public key of the certificate doesn't have any bearing on whether or not Let's Encrypt considers it a renewal. Certificate B is considered a renewal of Certificate A if and only if the set of subject identifiers (CN and SANs) between A and B are an exact match. If Certificate A and B have the same names but different public keys Certificate B is still a renewal for rate limiting purposes. If Certificate B added or removed a name it would not be considered a renewal.
I think testing this in an end-to-end integration testing scenario with Boulder will be tricky for the reasons you describe. It might be helpful to know that Boulder's existing integration tests take the same approach you describe here (starting Boulder with one set of configs, doing some setup, tearing Boulder down, changing the config, and then restarting Boulder) to simulate the passage of time. See: https://github.com/letsencrypt/boulder/blob/9afa0f7f1967fd4b8c63f4a100a2795461b36609/test/integration-test.py#L722-L737 ( |
Hmmm as I view it the test will still work, The minimum validity of the We just have to make sure that changes made still allow the This seems to be the same type of confusion as #485 (comment). The different time value relationship and current values (in seconds) is as follow: 0 < A (7200) ≤ B (
|
Yes indeed. |
Done. |
Yes, I'm aware of this, and I haven't managed to understand why this is happening yet. |
Oh, one last thing, I've noticed that for some reason your commit messages are prefixed with a star and a space ( |
Allows to specify the minimum validity of certificates per container.
Modified Boulder to issue certificates with 88 day lifetime
That's just the commit message convention that I use.
Done |
Add MIN_VALIDITY_CAP info to the README
Thanks for the good work 👍 |
@Greek64 the test unit fails quite often, if you have some spare time could you try to investigate and see if it could be made a bit more reliable ? edit : it seems to be failing way more often on the three containers setup than on the two containers setup. |
Will do. (although until now I had it never fail before... Then again I'm mostly testing with the two container setup...) |
I ran the It will be difficult for me to debug this. First a small Explanation of what the tests doesThe test unit creates 3 containers of which only one ( Possible Solution 1Since the Possible Solution 2The certificates are parsed again immediately after the triggering of the |
I haven't seen CI errors related to this in weeks, so I guess this is no longer relevant. The errors are probably more Travis related than anything. |
This PR adds another environment variable called
LETSENCRYPT_MIN_VALIDITY
, that can be used to set the minimum validity of certificates per container.Closes #477