We’ve been experimenting a weird behaviour in the Let’s Encrypt ACMEv2 staging environment. The explained behaviour isn’t reproducible in production right now.
We use our own solution based on the official ACME library for python3 (https://pypi.org/project/acme/). This has been reproduced with acme 0.31.0 and 0.32.0 using the dns-01 challenge.
Upon a new certificate is being configured, we request the ECDSA + RSA versions. In some ocassions the Let’s Encrypt ACMEv2 staging environment sets as invalid the authz for the second version issued:
- ECDSA certificate gets issued
- RSA certificate fails to validate the dns-01 challenges.
We’ve also observed that the certificates get issued after waiting some minutes.
- ECDSA certificate gets issued
- RSA certificate fails to validate the dns-01 challenges.
- Wait 6 minutes
- ECDSA certificate gets issued
- RSA certificate gets issued
If we attempt to get issued the RSA certificate first it succeeds and then the ECDSA one fails.
As an example of a failure order with the whole logs from our applications: https://acme-staging-v02.api.letsencrypt.org/acme/order/7090084/30282144. The certificate that we’re trying to get issued is pretty simple, CN: tendril.wikimedia.org
.
As it can be seen in the application log at the end of the post, the ECDSA (ec-prime256v1) certificate gets issued successfully but it fails to validate the challenges for the rsa-2048 one. Please take into account that our code validates successfully that the solved dns-01 challenges have been successfully published in our DNS servers. But for some reason the solved challenge that we get in the first attempt for the rsa-2048 certificate: mngAKhYePDExCl80HhVcB97bRt64YoRWPq3O4vp4LiE
doesn’t match the one expected by LE staging environment: JtwCcdhuHEgC-lQ2R-rVIFkEgKvVpbWcyIrzFNpLF3E
obtained from https://acme-staging-v02.api.letsencrypt.org/acme/authz/hSHz4rypr5VBdA0uq8dDgerFrQ0fO9iT-3HKr2IfW1s
Also it should be taken into account that the challenge solving is handled by the official python3 ACME library and not by our custom integration.
Apr 10 09:33:30: Handling new certificate event for tendril / ec-prime256v1
Apr 10 09:33:30: Running subprocess ['/usr/local/bin/acme-chief-gdnsd-sync.py', '--remote-servers', 'authdns1001.wikimedia.org', 'authdns2001.wikimedia.org', 'multatuli.wikimedia.org', '--', '_acme-challenge.tendril.wikimedia.org', 'eZEj0891mrN6bdKf6Qg3ocaPdurvno6u0aKa3ZZLyws']
Apr 10 09:33:33: Handling pushed CSR event for tendril / ec-prime256v1
Apr 10 09:33:33: Handling validated challenges event for tendril / ec-prime256v1
Apr 10 09:33:33: Handling pushed challenges event for tendril / ec-prime256v1
Apr 10 09:33:34: Handling order finalized event for tendril / ec-prime256v1
Apr 10 09:33:36: Pushing the new certificate for tendril
Apr 10 09:33:36: Waiting till tendril / rsa-2048 is generated to be able to push the new certificate
Apr 10 09:33:36: Handling new certificate event for tendril / rsa-2048
Apr 10 09:33:36: Running subprocess ['/usr/local/bin/acme-chief-gdnsd-sync.py', '--remote-servers', 'authdns1001.wikimedia.org', 'authdns2001.wikimedia.org', 'multatuli.wikimedia.org', '--', '_acme-challenge.tendril.wikimedia.org', 'mngAKhYePDExCl80HhVcB97bRt64YoRWPq3O4vp4LiE']
Apr 10 09:33:38: Handling pushed CSR event for tendril / rsa-2048
Apr 10 09:33:38: Handling validated challenges event for tendril / rsa-2048
Apr 10 09:33:38: Handling pushed challenges event for tendril / rsa-2048
Apr 10 09:33:38: ACME Directory has rejected the challenge(s) for certificate tendril / rsa-2048
Apr 10 09:33:38: ACME directory has rejected the challenge(s) for order https://acme-staging-v02.api.letsencrypt.org/acme/order/7090084/30282144
--- OUTPUT OMITTED. Another attempt happens. In this occasion both ECDSA+RSA certs are issued successfully ---
Apr 10 09:39:30: Handling new certificate event for tendril / ec-prime256v1
Apr 10 09:39:31: Running subprocess ['/usr/local/bin/acme-chief-gdnsd-sync.py', '--remote-servers', 'authdns1001.wikimedia.org', 'authdns2001.wikimedia.org', 'multatuli.wikimedia.org', '--', '_acme-challenge.tendril.wikimedia.org', 'hCDCpO1qpnPTWp-y6MJ5bo_BGzbuyjY0vXImO-VFDnU']
Apr 10 09:39:33: Handling pushed CSR event for tendril / ec-prime256v1
Apr 10 09:39:33: Handling validated challenges event for tendril / ec-prime256v1
Apr 10 09:39:33: Handling pushed challenges event for tendril / ec-prime256v1
Apr 10 09:39:35: Handling order finalized event for tendril / ec-prime256v1
Apr 10 09:39:36: Pushing the new certificate for tendril
Apr 10 09:39:36: Waiting till tendril / rsa-2048 is generated to be able to push the new certificate
Apr 10 09:39:36: Handling new certificate event for tendril / rsa-2048
Apr 10 09:39:37: Running subprocess ['/usr/local/bin/acme-chief-gdnsd-sync.py', '--remote-servers', 'authdns1001.wikimedia.org', 'authdns2001.wikimedia.org', 'multatuli.wikimedia.org', '--', '_acme-challenge.tendril.wikimedia.org', 'COvB8oOd_FM8sVmyLXmKBIzd0HdQo0e-ZQZ2PFN5jDY']
Apr 10 09:39:39: Handling pushed CSR event for tendril / rsa-2048
Apr 10 09:39:39: Handling validated challenges event for tendril / rsa-2048
Apr 10 09:39:39: Handling pushed challenges event for tendril / rsa-2048
Apr 10 09:39:43: Handling order finalized event for tendril / rsa-2048
Apr 10 09:39:44: Pushing the new certificate for tendril