Hello, I've got:
- problem and
- probable solution which I want to validate.
My domain I will provide if it will be needed.
I ran this command:
# certbot certonly --standalone --http-01-port 80 -d our.domain.com --agree-tos --no-eff-email --register-unsafely-without-email
It produced this output:
Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
Domain: our.domain.com
Type: unauthorized
Detail: The key authorization file from the server did not match this challenge. Expected "0_AjkGBJufhULLs25WOJ3pPr7N9J45f-SEfDUFK1b6s.bCAWl_CqF8_ctcevB2V0xsMKA25_PliHfqbN5KQR0SE" (got "")
The operating system my web server runs on is (include version):
Red Hat Enterprise Linux 8.10 (Ootpa)
I can login to a root shell on my machine: yes
The version of my pip installed client:
# certbot --version
certbot 2.11.0
- Problem: I try to make certificate and I've got error (because Empty string did not match the challenge)
Our problem is that: we have Consul, and it sends domain request to k8s pod (I can't send request directly to certbot server). So domain request (http://<YOUR_DOMAIN>/.well-known/acme-challenge/) first goes to pod's webserver, then request's copy sends to certbot standalone server to localhost:80.
But Certbot's response doesn't contain a string, it only contains headers:
{'Server': 'BaseHTTP/0.6 Python/3.10.12', 'Date': 'Tue, 16 Jul 2024 13:53:28 GMT'}
- Probable solution:
I know that response for acme-challenge should contain string: <TOKEN>.<Account Thumbprint>
.
So my webserver forms this string and sends it in response. Then everything is Fine!
But my question is: this solution is good? There will not be consequences, some side-effects?