Repository navigation
pebble-challtestsrv: small binary for mock DNS & ACME challenges. - #181
Merged
Merged
Conversation
added 2 commits
December 4, 2018 16:41
Boulder has a nice handy challtestsrv package and command. Its small and useful enough to live in the Pebble repo where more folks can use it without pulling in all of Boulder's heavy deps. The `challtestsrv` package is ported over with some improvements. Notably: * The TLS-ALPN-01 and HTTPS HTTP-01 features were split into two separate binds. This helps us preserve strict TLS-ALPN-01 challenge responses while also supporting HTTP-01 -> HTTPS HTTP-01 redirects. * The "FAKE_DNS" env var is removed. Now there is a default IPv4 and a default IPv6 address that can be set via the management API. These default addresses are used for A/AAAA query responses when there is not a more specific mock. * Hardcoded Boulder specific mock DNS data is removed. In its place are new management API functions for adding/removing mock A, AAAA, and CAA records * Updated documentation for all of the above & TLS-ALPN-01 challenges. * Less noisy output! The DNS server no longer prints a line per reply. A new `pebble-challtestsrv` stand alone binary is added to expose the `challtestsrv` package with a little HTTP API. This does require pulling in a dep. on `github.com/miekg/dns` but I think its a fair tradeoff (dns only has 2 small golang/x/ transitive deps).
Contributor
Author
|
I think I might extract the |
Contributor
Author
|
Closing this for now while I pursue a first-class repo for the challtestsrv package (letsencrypt/challtestsrv#1) I will re-open this when I can vendor that module into Pebble instead of putting the package in this repo. |
Contributor
Author
This was done in 2e8f228 |
Contributor
Author
|
I updated the Docker support & documentation to make it really easy to stand up a |
added 2 commits
December 7, 2018 17:25
jsha
approved these changes
Dec 7, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boulder has a nice handy
challtestsrvpackage and command used for integration tests. Its small and useful enough that the library portion has been promoted to a first-class repo: https://github.com/letsencrypt/challtestsrvThe stand-alone binary with an HTTP management interface can come live in the Pebble repo where more folks can use it without pulling in all of Boulder. I've heard from a few ACME client developers that this would be useful to them. It is possible we could achieve the same thing by leaving the binary in the Boulder repo using the updated code that doesn't import other things from Boulder. Moving it out of the repo will help us commit to working on abstractions that make tests cleaner. This also makes it quick and easy to have a full Pebble environment with mock DNS without needing to install tools from other repos.
The dependency on the letsencrypt/challtestsrv package does require pulling in a dep. on
github.com/miekg/dns(and vendoring it) but I think its a fair tradeoff.The provided Dockerfile is now split into two dockerfiles (see
docker/directory): one forpebbleand one forpebble-challtestsrv. They are both updated to use Go 1.11, to build with the vendored modules instead of fetching them at build time, and to use the latest Alpine base image.A new
docker-compose.ymlexample is included that starts up apebble-challtestsrvcontainer and apebblecontainer that uses the former as its DNS server. The README is updated to explain the usage briefly.