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

Adds DNS-01 challenge type support. #19

Merged
merged 3 commits into from
Apr 19, 2017
Merged

Adds DNS-01 challenge type support. #19

merged 3 commits into from
Apr 19, 2017

Conversation

cpu
Copy link
Contributor

@cpu cpu commented Apr 19, 2017

This commit adds DNS-01 challenges as a supported challenge type for
Pebble. The WFE is modified to construct a DNS-01 challenge along with
the HTTP-01 and TLS-SNI-02 challenges for every new pending authz.
A new configuration parameter is added to the config file for the
upstream DNS resolvers to use.

The validation implementation is very close to Boulder's VA & bdns
implementation, but simplified for just TXT records & a simple DNS-01
challenge mechanism. Note: this commit adds a dependency on miekg/dns
and you may need to go get ./... since we don't do any sort of godeps
magic/vendoring at present.

This commit adds DNS-01 challenges as a supported challenge type for
Pebble. The WFE is modified to construct a DNS-01 challenge along with
the HTTP-01 and TLS-SNI-02 challenges for every new pending authz.
A new configuration parameter is added to the config file for the
upstream DNS resolvers to use.

The validation implementation is very close to Boulder's VA & `bdns`
implementation, but simplified for just TXT records & a simple DNS-01
challenge mechanism. Note: this commit adds a dependency on miekg/dns
and you may need to `go get ./...` since we don't do any sort of godeps
magic/vendoring at present.
@cpu cpu self-assigned this Apr 19, 2017
@cpu cpu requested a review from jsha April 19, 2017 17:21
va/va.go Outdated

m := new(dns.Msg)
m.SetQuestion(dns.Fqdn(hostname), qtype)
// Set DNSSEC OK bit for resolver
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not accurate. The docs for this:

func (dns *Msg) SetEdns0(udpsize uint16, do bool) *Msg
SetEdns0 appends a EDNS0 OPT RR to the message. TSIG should always the
last RR in a message.

So this should be something like "accept large UDP replies." Also note that (a) we don't expect large replies because we don't evaluate DNS ourselves, and (b) if you're talking to 8.8.8.8, you're going over the public internet, which I think has a lower MTU than in-datacenter. So you'd expect IP fragmentation with a 4096-bit reply. I think let's delete this for now, and we can experiment with different settings if it causes real-world problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! that will teach me to lift a comment without verifying. That came unedited from Boulder.

I will remove it. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I remember being confused about this bit and this comment several times. I think probably part of the confusion is that the main reason to set this higher is because DNSSEC replies are large.

va/va.go Outdated
@@ -22,6 +24,7 @@ import (
"github.com/letsencrypt/pebble/acme"
"github.com/letsencrypt/pebble/ca"
"github.com/letsencrypt/pebble/core"
"github.com/miekg/dns"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to use miekg/dns here instead of https://golang.org/pkg/net/#LookupTXT ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know it was available :-) I was following the Boulder VA which used this dep. I'll try to rework on top of net.LookupTXT

@cpu
Copy link
Contributor Author

cpu commented Apr 19, 2017

@jsha feedback addressed - thanks!

@jsha jsha merged commit 60690c1 into master Apr 19, 2017
@jsha jsha deleted the cpu-add-dns-01 branch April 19, 2017 21:50
mcpherrinm pushed a commit to mcpherrinm/pebble that referenced this pull request May 24, 2024
This allows testing Boulder's code to log when old TLS versions are
used.
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.

2 participants