mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
dehydrated does not work with DigiCert ACMEv2 API - token value confusion between challenge types #479
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 @colin-stubbs on GitHub (May 28, 2020).
The current code within sign_csr() that tries to determine the token to use with the selected challenge type seems to fail to pick the correct token.
If dehydrated is configured to perform dns-01 validation, but the ACME API returns all three challenge types (dns-01, tls-alpn-01, http-01) BUT with different token values for each, the token value from the last entry in the list is used.
e.g. the token value specific to the http-01 challenge is used by dehydrated as part of dns-01 (hook deploys DNS record), and the DigiCert ACMEv2 API when asked to verify that token (it's the http-01 NOT the dns-01 value) it goes ahead and correctly performs a check for http-01 token via HTTP instead of dns-01 via DNS.
The issue is in sign_csr() when it iterates over the list of challenges return in the JSON payload from this response,
@colin-stubbs commented on GitHub (May 28, 2020):
Example from Let's Encrypt, where token values are all the same... so the assumption that the last token value can be used still works.
@colin-stubbs commented on GitHub (May 28, 2020):
Summary of issues found in DigiCert ACME API endpoint:
@colin-stubbs commented on GitHub (May 28, 2020):
Tested against both Let's Encrypt and DigiCert... DigiCert failing for somewhat expected reason now, e.g. no funds to use for cert.
@danimo commented on GitHub (Sep 2, 2020):
@colin-stubbs Can you check my pull request? It's essentially a rebase of your patch to master (which uses json.sh).
@lukas2511 commented on GitHub (Dec 10, 2020):
I think this should be fixed by now, otherwise please comment or feel free to open a new issue.