Hello,
I'm new to ACME and I'm implementing an ACME client from ground up in python to learn about it. Right now, I'm stuck at the challenge validation process.
To test the keyAuthorization, I created a HTTP server that responds to "GET /.well-known/acme-challenge/" requests from the ACME server to validate the challenge.
The jwk file used to generate the keyAuthorization is:
Hi @vizual1, and welcome to the LE community forum
I'm not an expert in this area and I might be mistaken about anything I say here.
And surely someone more knowledgeable will come around to help.
But until then...
While glancing at your post I noticed there is no mention of base64 encoding.
I thought that was required in there somewhere.
as acme http challange file is reflective : first part before . of answer file should be same with what url acme server visit with so you failed to get right auth path
keyAuthorization = token || '.' || base64url(Thumbprint(accountKey))
and acme server visits well-known/acme-challange/token
I think you processed token wrong
from pebble log token it set for auth was
I also double checked with the ACME client, and also did a request to the HTTP server. The HTTP server returns a response at response.text, which is the keyAuthorization.
Pebble should return an error message to the ACME client, which would be very helpful. It seems the Pebble log itself doesn't provide much information as to WHY the challenge fails.
You're running your challenge response HTTP server on port 5002, right?
In the ACME client, I use a while loop to check if the status of the request is still "pending", and continued to send requests after every 2 seconds of wait time. The first request, returns:
@orangepizza Pebble is written in Go, so it would require compiling the source code. It's unfortunately not written in an interpreted language such as Python.
The "next request" is just a retry until the status of the response isn't "pending" anymore. Between each "pending" request, I wait for 2 seconds.
I tried to get the output, but is seems like the problem is different than I thought. For some reason the validation request of the ACME server doesn't reach the HTTP server, even though the ACME client can create GET request to http://localhost:5002/.well-known/acme-challenge/_token_ without problems, and get the keyAuthorization back.
iirc unless configed differently pebble will resolve everything to a 127.0.0.1 and connect localhost
but looking at domain OP used dont think this is problem
Yes, I use docker to run pebble. I think that is the problem, so I have to either change the configuration of pebble docker-compose.yml or to configure the HTTP server to another IP address to test it.
That might be a stupid question, but how do I set pebble in the $PATH? Where is the binary entry point? I'm using Windows 10 and I cannot find any bin folder where I can set the path.