Hello there,
This is the continuation of the problem I mentionned at Letsencrypt doesn't verify dns-01 and leaves challenge in status: pending state - #18 by arek.
My question is which of those 2 implementation are correct ? If None, then which one is correct ?
I firstly implemented the following:
DEBUG: JWS payload:
b''
DEBUG: Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/authz/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A:
{
"signature": "LiSsgSD0QflQ-s2XSV4qIyJy1xJbLln_3LtYERbfZ7wh2d8ICOTWWSEvvhVpHW5uo-Bz-NXXvg3NnJVJbAsvQ6MZiQzW2pj-0p8dKivz-R4SV4NhUSEq_F9lfDAqQxmT8JK1w8-9WlaYrAOLuA1G-RYJSONNvWTAkgSExdNBZJYJNAfUvpkGd3txhy3R8-kLOqfhg9QF5NaChsnpKG0wfi44bSSsNLSgdU-WYfifdVEbDm7qX0-QiZ55zBoofiLXMO26AryIpKIoU-CmNXwaNGqRhOOWu9yQgigGcCQIzUaPpsAuq2QByMcEA7yyW23B3vSX6MOIhsojXyEbByKhPQ",
"protected": "eyJhbGciOiAiUlMyNTYiLCAibm9uY2UiOiAiVXNTYVVfUkxNNzVxdHMwYWExNmpub2lySVg1MXh1QnZMTWZVUDctR1h2MCIsICJ1cmwiOiAiaHR0cHM6Ly9hY21lLXN0YWdpbmctdjAyLmFwaS5sZXRzZW5jcnlwdC5vcmcvYWNtZS9hdXRoei90TEF5WFNfYTItcGgxR20wSTJWLWJfaE9Pc2JOWnJueVFVZk5maEN4Zi1BIiwgImtpZCI6ICJodHRwczovL2FjbWUtc3RhZ2luZy12MDIuYXBpLmxldHNlbmNyeXB0Lm9yZy9hY21lL2FjY3QvODY1MjQ4OSJ9",
"payload": ""
}
DEBUG: https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/authz/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A HTTP/1.1" 200 929
DEBUG: Received response:
HTTP 200
Server: nginx
Content-Type: application/json
Content-Length: 929
Boulder-Requester: 8652489
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: 0nsVTLEmI-zowO3uk4yoRZLry8tAd5W1jbmfraizoXc
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
Expires: Fri, 22 Mar 2019 12:26:34 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Fri, 22 Mar 2019 12:26:34 GMT
Connection: keep-alive
{
"identifier": {
"type": "dns",
"value": "test.juris-sb.de"
},
"status": "pending",
"expires": "2019-03-29T09:12:09Z",
"challenges": [
{
"type": "http-01",
"status": "pending",
"url": "https://acme-staging-v02.api.letsencrypt.org/acme/challenge/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A/278379717",
"token": "G6h6aagnc_J4fKWZlSRRwQDFJOW529gtyugodWBxMcc"
},
{
"type": "dns-01",
"status": "pending",
"url": "https://acme-staging-v02.api.letsencrypt.org/acme/challenge/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A/278379718",
"token": "UJICsxiz22UlY8z6KXPR5Xph61ApwN36A10JaF0nVuE"
},
{
"type": "tls-alpn-01",
"status": "pending",
"url": "https://acme-staging-v02.api.letsencrypt.org/acme/challenge/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A/278379719",
"token": "vNN5b7yxtEkiNoNg6rVgTiniUJsAckB6lOQa75wGmeE"
}
]
}
DEBUG: Storing nonce: 0nsVTLEmI-zowO3uk4yoRZLry8tAd5W1jbmfraizoXc
With the DNS entry:
$ dig +short -t TXT _acme-challenge.test.juris-sb.de
"UJICsxiz22UlY8z6KXPR5Xph61ApwN36A10JaF0nVuE"
Then I have been told by @rmbolger at Letsencrypt doesn't verify dns-01 and leaves challenge in status: pending state - #13 by ezekiel
The
token
value supplied in the dns-01 authz is not the only thing that needs to be in the TXT record. You need a âkey authorizationâ value which is a combination of that token and the ACME accountâs thumbprint as described in section 8.1 of the ACME spec.
I may have misunderstood something but then, I implemented:
DEBUG: Storing nonce: oLqYdonM4ARA0ib3ZiZs1B11KKW9IweXDbMVSnYzPPg
DEBUG: JWS payload:
b''
DEBUG: Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/authz/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A:
{
"protected": "eyJub25jZSI6ICJvTHFZZG9uTTRBUkEwaWIzWmlaczFCMTFLS1c5SXdlWERiTVZTbll6UFBnIiwgInVybCI6ICJodHRwczovL2FjbWUtc3RhZ2luZy12MDIuYXBpLmxldHNlbmNyeXB0Lm9yZy9hY21lL2F1dGh6L3RMQXlYU19hMi1waDFHbTBJMlYtYl9oT09zYk5acm55UVVmTmZoQ3hmLUEiLCAiYWxnIjogIlJTMjU2IiwgImtpZCI6ICJodHRwczovL2FjbWUtc3RhZ2luZy12MDIuYXBpLmxldHNlbmNyeXB0Lm9yZy9hY21lL2FjY3QvODY1MjQ4OSJ9",
"signature": "MhVjwKn1btMLeamwBnvIbZhNCZrfNE-rBnn7EdII8jVgY4nsl7WPNeoxiKmy2Cq01MZhIeRqitZnmOJMYeKKiBWCpy88Kb7B_KwgNt04i6_0yLO_2Z-dMmjPg-BWBFO-SM9HKka2Q-dZVAvS5t0n_-rvr1yiEqe1O__6SJocz9hztU0fumxgR7ba_xpXIbpAlcjW6gjmspbvX8UmkHAClt9ocN-X2DKIRyfe3-ndeSBIg4wwQObi-B9AVgrg_kfURdKI3Ue1pS8GbNoXiehzu1JRMqu3WxV0h3PKp1di8tQUvJNAH2ZK_VDnFQwg6tumpMX3gQSxego_hrwgEkc0bQ",
"payload": ""
}
DEBUG: https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/authz/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A HTTP/1.1" 200 929
DEBUG: Received response:
HTTP 200
Server: nginx
Content-Type: application/json
Content-Length: 929
Boulder-Requester: 8652489
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: LDMytKc-W_VSYYRvcdkJut2llCGu_OlLQcRX4xZ9pUc
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
Expires: Mon, 25 Mar 2019 08:59:09 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Mon, 25 Mar 2019 08:59:09 GMT
Connection: keep-alive
{
"identifier": {
"type": "dns",
"value": "test.juris-sb.de"
},
"status": "pending",
"expires": "2019-03-29T09:12:09Z",
"challenges": [
{
"type": "http-01",
"status": "pending",
"url": "https://acme-staging-v02.api.letsencrypt.org/acme/challenge/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A/278379717",
"token": "G6h6aagnc_J4fKWZlSRRwQDFJOW529gtyugodWBxMcc"
},
{
"type": "dns-01",
"status": "pending",
"url": "https://acme-staging-v02.api.letsencrypt.org/acme/challenge/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A/278379718",
"token": "UJICsxiz22UlY8z6KXPR5Xph61ApwN36A10JaF0nVuE"
},
{
"type": "tls-alpn-01",
"status": "pending",
"url": "https://acme-staging-v02.api.letsencrypt.org/acme/challenge/tLAyXS_a2-ph1Gm0I2V-b_hOOsbNZrnyQUfNfhCxf-A/278379719",
"token": "vNN5b7yxtEkiNoNg6rVgTiniUJsAckB6lOQa75wGmeE"
}
]
}
DEBUG: Storing nonce: LDMytKc-W_VSYYRvcdkJut2llCGu_OlLQcRX4xZ9pUc
With the record:
$ dig -t TXT +short _acme-challenge.test.juris-sb.de
"UJICsxiz22UlY8z6KXPR5Xph61ApwN36A10JaF0nVuE.Y-ETMP1lasSBSfpx-W8r15Vj4H1psxxfij91tOWeQkw"
Now which one is correct ? What am I missing ?
Side Notes:
- I use our own client designed for our needed based on https://github.com/certbot/certbot/tree/master/acme/ (python-acme) v0.32.0
- I used
challenges.KeyAuthorizationChallengeResponse()
to verifyUJICsxiz22UlY8z6KXPR5Xph61ApwN36A10JaF0nVuE.Y-ETMP1lasSBSfpx-W8r15Vj4H1psxxfij91tOWeQkw
(last record) UJICsxiz22UlY8z6KXPR5Xph61ApwN36A10JaF0nVuE.Y-ETMP1lasSBSfpx-W8r15Vj4H1psxxfij91tOWeQkw
was generated withkey_authorization()
Thanks the help.