Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ACMEv2 (RFC8555) #34

Merged
merged 13 commits into from
Jun 29, 2021
Merged

Update to ACMEv2 (RFC8555) #34

merged 13 commits into from
Jun 29, 2021

Conversation

ramonschriks
Copy link
Contributor

@ramonschriks ramonschriks commented Mar 20, 2020

Refactored the ACME library to support the ACMEv2 protocol based on the RFC8555. This release breaks implementations that rely on ACMEv1, since ACMEv2 has a different flow for requesting and retrieving a certificate.

  • We've refactored to current library to ACMEv2, meaning that support for v1 is dropped!
  • We've tried to keep the library as much as in tact as is, without changing too much to the actual structure.

New:

Updated:

  • Updated AcmeErrors
  • Updated AcmeResources
  • Updated the jws request body that requires a slightly different format

I might have forgotten to mention one or more things that have been changed, but it is also noted inside the commits.

**This requires review and testing before it can be considered as production-ready. Please contact us if you are having questions/notes. We'd like to keep in touch for reviewing.

You can contact us at: scrumteam@xel.nl**

ps. I need some help to get the tests working with pebble in docker.

Ramon and others added 9 commits March 12, 2020 23:04
- signJwt is not using SimpleJWS, but self signs and encodes. Support for POST-as-GET with empty payload and some small refactoring according to ACMEv2 with providing the account location in the jws header if present.
- Added Domain objects for wrapping responses. Corresponds to fields defined in RFC8555.
- Added content-type in header in acmeClient
- Added errors and resources corresponding RFC8555
- Updated register, requestChallenge (newOrder), answerChallenge
- Added getChallenge given a authorizationUrl

TODO: pollForChallenge, requestCertificate, pollForCertificate, revokeCertificate, unit tests and TESTING!
- Updated requestCertificate to use the locationUrl
- Updated pollCertificate with POST-as-a-GET request
- Updated pollCertificate. When success, use the download location URL in response to download the certificate data.
- Updated pollCertificate. Link in header in ACMEv2 contains rel="index", this conflicts with the previous link check causing chain to be reached. Fixed this.
- Fixed type in revoke certificate.

- Updated method in AcmeResource which checks if a resource needs Jwk authorization. Removed the revoke action since this can be done using both kid as jwk header in jws.
  We use kid in this client.

TODO: unit tests, validating implementation with IETF-8555 and review.
- Small cleanups/fixes
- Added location in newOrder response to order object for returning
- Added getOrder method in AcmeService for POST-as-a-GET the Order using the order's location URL
- Added location header in order response in finalizeOrder request
@kelunik
Copy link
Owner

kelunik commented Mar 24, 2020

Wow, thanks! These are a lot less changes than I expected. Will migrate my client based on this library to test it.

@kelunik kelunik changed the title Updated to ACMEv2 (RFC8555) Update to ACMEv2 (RFC8555) Jun 29, 2021
@kelunik kelunik merged commit 086a2a2 into kelunik:master Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants