-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/crypto/acme: nonce error returned because of rate limit hit #18428
Comments
I made letsencrypt/boulder#2450 for Let's Encrypt's side of this, but it seems like a fixable thing from |
CL https://golang.org/cl/34623 mentions this issue. |
(Just as FYI: the 429s from Let's Encrypt are a new, currently undocumented request-per-IP-per-endpoint-per-second rate limit that's set fairly low if you're parallelizing new-authz calls for a cert. This doesn't change crypto/acme's decision making much, though.) |
This is a minimal fix to the HEAD rate limit problem discussed in golang/go#18428. We send the HEADs for fetching nonces to a URL that we know will be safer to hit than the POST-only resources where Let's Encrypt is interpreting HEAD requests as POSTs and incrementing rate limits as such. The safe URL chosen is the directory URL of the ACME server. A larger fix might use nonces gathered from previous API calls instead of making a second API call for each API call made. This also does not address the rate limit error being hidden by the nonce error as discussed in golang/go#18428. Updates golang/go#18428. Change-Id: I378c64759bd5315aa96b4daff107d2741d742349
/cc @bradfitz |
/cc @x1ddos |
Working on it now, on all issues (collecting, better err, etc.) There could be an issue with collecting nonces from previous responses as Let's Encrypt keeps only a limited num. of issued nonces: https://github.com/letsencrypt/boulder/blob/affa0e92cd1bae31dcdfb6ae41c13a8b82e499b7/nonce/nonce.go#L18, so I'll make it a buffer with at most N collected nonces. |
CL https://golang.org/cl/36514 mentions this issue. |
Before this change, every JWS-signed request was preceded by a HEAD request to fetch a fresh nonce. The Client is now able to collect nonce values from server responses and use them for future requests. Additionally, this change also makes sure the client propagates any error encountered during a fresh nonce fetch. Fixes golang/go#18428. Change-Id: I33d21b450351cf4d98e72ee6c8fa654e9554bf92 Reviewed-on: https://go-review.googlesource.com/36514 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Before this change, every JWS-signed request was preceded by a HEAD request to fetch a fresh nonce. The Client is now able to collect nonce values from server responses and use them for future requests. Additionally, this change also makes sure the client propagates any error encountered during a fresh nonce fetch. Fixes golang/go#18428. Change-Id: I33d21b450351cf4d98e72ee6c8fa654e9554bf92 Reviewed-on: https://go-review.googlesource.com/36514 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Before this change, every JWS-signed request was preceded by a HEAD request to fetch a fresh nonce. The Client is now able to collect nonce values from server responses and use them for future requests. Additionally, this change also makes sure the client propagates any error encountered during a fresh nonce fetch. Fixes golang/go#18428. Change-Id: I33d21b450351cf4d98e72ee6c8fa654e9554bf92 Reviewed-on: https://go-review.googlesource.com/36514 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Before this change, every JWS-signed request was preceded by a HEAD request to fetch a fresh nonce. The Client is now able to collect nonce values from server responses and use them for future requests. Additionally, this change also makes sure the client propagates any error encountered during a fresh nonce fetch. Fixes golang/go#18428. Change-Id: I33d21b450351cf4d98e72ee6c8fa654e9554bf92 Reviewed-on: https://go-review.googlesource.com/36514 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Before this change, every JWS-signed request was preceded by a HEAD request to fetch a fresh nonce. The Client is now able to collect nonce values from server responses and use them for future requests. Additionally, this change also makes sure the client propagates any error encountered during a fresh nonce fetch. Fixes golang/go#18428. Change-Id: I33d21b450351cf4d98e72ee6c8fa654e9554bf92 Reviewed-on: https://go-review.googlesource.com/36514 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
I'm consistently getting back
acme: nonce not found
on a cert of mine, becausefetchNonce
is doing a fewHEAD
s tohttps://acme-v01.api.letsencrypt.org/acme/new-authz
and getting back a 429 rate limit hit back.While the real problem is the rate limit being reached, it was hidden by the
nonce not found
error that can only be detected by callingerr.Error()
on it.Let's Encrypt could be kinder to us, but it would be beneficial for x/crypto/acme, if it needs a nonce, to hit an endpoint that is guaranteed to be relatively safe from rate-limiting. Perhaps, the
/directory
path?It'd also be cool for crypto/acme to be storing nonces it's gathered from previous normal API calls and using those, instead of calling out again to fetchNonce for every new API call.
It'd also be nice for crypto/acme to return a specific error when it hits one of the various rate limits.
The text was updated successfully, but these errors were encountered: