mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 23:23:32 +01:00
no renewal with pebble #578
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ibukanov on GitHub (Sep 6, 2022).
Originally assigned to: @lukas2511 on GitHub.
It seems dehydrated does not with pebble, a test acme server that is useful for local testing of certificate renewals.
To reproduce, install pebble as instructed in the above link. Typically it is necessary to adjust test/config/pebble-config.json in pebble checkout to match local server HHTP port from 5002 to 8080 or whatever.
Then adjust /etc/localhost to contain:
127.0.0.1 www.example.com
Then configure HTTP server running locally to respond to www.example.com
It is also necessary to set CURL_CA_BUNDLE environment variable to path-pebble-checkout/test/certs/pebble.minica.pem.
Then run pebble and then dehydrated like in:
While the first command reports success, te seconds fails with the log:
@ibukanov commented on GitHub (Sep 7, 2022):
The problem is that hydrated does not properly handle nonce. The code uses HEAD to get one, but ACME specs does not allow that. In particularly, the code must track nonce from the previous requests as required by ACME. pebble explicitly deviates from boulder in that respect to test spec conformance.
@lukas2511 commented on GitHub (Sep 7, 2022):
Mh, has there been an update to the spec I haven't seen yet? The rfc clearly states:
Maybe it's intentionally a
badNonceerror to check for compliance with another part of the rfc?But that's only a
SHOULD, so except for some test scenarios it should still work in normal operation... I'll look into this... Last time I tried it worked against pebble without any issues.@lukas2511 commented on GitHub (Sep 7, 2022):
The rfc also states that clients are free to use nonces as they wish, even allowing for something like grabbing a pool of nonces before doing anything else. The only more strict definition is about the
badNoncemessages, which would require to use the nonce that came with the error response in a retry.@lukas2511 commented on GitHub (Sep 7, 2022):
Okay the spec hasn't changed, this is actually a test-feature of pebble, forcing implementation of retries on
badNonceerrors... https://github.com/letsencrypt/pebble#invalid-anti-replay-nonce-errors@lukas2511 commented on GitHub (Sep 7, 2022):
I've implemented a workaround for this in
6fb8eba56a. Not going to merge it into master yet, as I'm hoping to clean up some implementation details soon, hopefully making such retry logic a lot easier.@ibukanov commented on GitHub (Sep 7, 2022):
The checkout from
6fb8eba56aworks, thanks for a quick fix and for the link about the pebble on purpose failing here.I suspect that others have not reported the issue previously because by default pebble fails in 5% of requests. If one uses it just to get single certificate, then the issue is not that visible. But it is almost certain to fail when one uses a test a setup with 15 different host names...
@lukas2511 commented on GitHub (Oct 31, 2022):
fix has now been released