Hi Johannes,
I ran into the same problem. Your post saved my night.
When trying to submit a new-authz, I got this response:
RESPONSE STATUS: 403
HEADERS: [('Server', 'nginx'), ('Content-Type', 'application/problem+json'), ('Content-Length', '137'), ('Boulder-Request-Id', 'nUDq2tctipap93zUx8nFvw1yZP7Ikt6Oi2wMt1s2xsg'), ('Boulder-Requester', '******'), ('Replay-Nonce', 'iSUqMyN_SGDmzTwQ7mUSBaDMdsq2sfwbZ73-mUl95v0'), ('Expires', 'Thu, 22 Dec 2016 11:21:19 GMT'), ('Cache-Control', 'max-age=0, no-cache, no-store'), ('Pragma', 'no-cache'), ('Date', 'Thu, 22 Dec 2016 11:21:19 GMT'), ('Connection', 'close')]
BODY: {'type': 'urn:acme:error:unauthorized', 'detail': 'Must agree to subscriber agreement before any further actions', 'status': 403}
I scrolled up to see the response of the successful new-reg:
RESPONSE STATUS: 201
HEADERS: [('Server', 'nginx'), ('Content-Type', 'application/json'), ('Content-Length', '583'), ('Boulder-Request-Id', 'TjlSrRKr6KEO2sXM4MD31j7oNWm_dfqcMp7vjeUY_Pk'), ('Boulder-Requester', ''), ('Link', 'https://acme-staging.api.letsencrypt.org/acme/new-authz;rel="next"'), ('Link', 'https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf;rel="terms-of-service"'), ('Location', 'https://acme-staging.api.letsencrypt.org/acme/reg/'), ('Replay-Nonce', 'knDvHPr8FrvLCyPJ9Vd5oouApFmlFbOkwOuD_xehH3Y'), ('X-Frame-Options', 'DENY'), ('Strict-Transport-Security', 'max-age=604800'), ('Expires', 'Thu, 22 Dec 2016 09:12:15 GMT'), ('Cache-Control', 'max-age=0, no-cache, no-store'), ('Pragma', 'no-cache'), ('Date', 'Thu, 22 Dec 2016 09:12:15 GMT'), ('Connection', 'keep-alive')]
SAVING NONCE: knDvHPr8FrvLCyPJ9Vd5oouApFmlFbOkwOuD_xehH3Y
{'key': {'n': 'p4XHQxSqTD_mkFWfdFZOr05fj8Z2JuYqgDtb-RAiuNIyalyzVmE-maxISF9jeugYrnJdeF788XgvDgjRjJdBz0ELUHNzBjGN6tXNdpue5Ck_lynv32RmjdYjOhH_bxCYV_hLugwvgo5nDkWEvj4l1bxPKU8VIQSH63ZHmQkHRsYAGD49PucZeCWbe76zOJ6wo47GkfGSXhh6mUeyPh4PPa8o2LXBnPGNNAg5F334wxuQfaoBwnA1Zj_4_BJR-ZdOYCkIKcgxbuDFbW5nKkVeA_X75sCVb9F-qAFWEzgZ-keTvJkafb8WTOZCrjxdU27q4qSWxXWfkFd6TBffOI2s6Q', 'kty': 'RSA', 'e': 'AQAB'}, 'Status': 'valid', 'initialIp': '...', 'createdAt': '2016-12-22T09:12:15.668933577Z', 'id': **, 'contact': ['@gmail.com']}
I searched for subscriber agreement on all versions of the ACME protocol but couldn't figure out how I was supposed to explicitly agree to https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. So I went to the source code of letsencrypt/acme/client.py, and found this function:
def agree_to_tos(self, regr):
"""Agree to the terms-of-service.
Agree to the terms-of-service in a Registration Resource.
:param regr: Registration Resource.
:type regr: `.RegistrationResource`
:returns: Updated Registration Resource.
:rtype: `.RegistrationResource`
"""
return self.update_registration(
regr.update(body=regr.body.update(agreement=regr.terms_of_service)))
With a bit of luck, I created a variant of my new-reg function, by adding this field into the payload:
'agreement': 'https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf'
, setting
'resource': 'reg',
and posted the request to /acme/reg/******
Then submitted a new-authz, it worked!!!!!!!!!
RESPONSE STATUS: 201
HEADERS: [('Server', 'nginx'), ('Content-Type', 'application/json'), ('Content-Length', '1008'), ('Boulder-Request-Id', 'AT3XDuUw80-o4u6Z6Ia6mt_gGtNBk1yA_SCuyx5OTGM'), ('Boulder-Requester', ''), ('Link', 'https://acme-staging.api.letsencrypt.org/acme/new-cert;rel="next"'), ('Location', 'https://acme-staging.api.letsencrypt.org/acme/authz/'), ('Replay-Nonce', '58aiWi1WiVgScay8DtDqogFgkQIkflrgR00sGO3V3Jc'), ('X-Frame-Options', 'DENY'), ('Strict-Transport-Security', 'max-age=604800'), ('Expires', 'Thu, 22 Dec 2016 11:51:42 GMT'), ('Cache-Control', 'max-age=0, no-cache, no-store'), ('Pragma', 'no-cache'), ('Date', 'Thu, 22 Dec 2016 11:51:42 GMT'), ('Connection', 'keep-alive')]
BODY: {'expires': '2016-12-29T11:51:42.222343123Z', 'combinations': [[0], [1], [2]], 'challenges': [{'uri': 'https://acme-staging.api.letsencrypt.org/acme/challenge/******************************/', 'token': '', 'type': 'http-01', 'status': 'pending'}, {'uri': 'https://acme-staging.api.letsencrypt.org/acme/challenge/****************/', 'token': '***', 'type': 'tls-sni-01', 'status': 'pending'}, {'uri': 'https://acme-staging.api.letsencrypt.org/acme/challenge/*************/', 'token': '-hB0', 'type': 'dns-01', 'status': 'pending'}], 'status': 'pending', 'identifier': {'type': 'dns', 'value': '.co.nz'}}
I'm getting one step closer to getting my certificate without using certbot!!!
The project LetsEncrypt is great, as it lowers the cost of obtaining an SSL Certificate to zero dollars. However, I believe there's room for the documentations to improve:
a) SEO of the latest version of ACME protocol. It should rank higher than the first edition on Google Search result;
b) Detailed and up-to-date documentation on the difference between the implementation of Boulder and the ACME protocol;
Cheers,
G