Commit Graph

129 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews f2b86769d2 Merge branch 'master' into no-500-dns 2015-11-11 18:20:48 -08:00
Jeff Hodges fe69a965e5 set an Accept header on VA HTTP requests
This fixes some mysterious breakages that Let's Encrypt users that also
used mod_security on their domains had.

There's some back and forth about whether the mod_security rule is wise,
but that's captured in a mod_security ticket linked from this PR's
ticket.

This patch is a one-line fix with no probable downside. We're not likely
to want to do many more things to satisfy misunderstandings around HTTP
but this seems fine to help our people out.

Fixes #1019.
2015-11-11 13:43:02 -08:00
Jacob Hoffman-Andrews e24314a0fb Move problemDetailsFromDNSError into new package. 2015-11-11 12:56:30 -08:00
Jacob Hoffman-Andrews 3ccc79e49d Don't serve 500's on DNS timeout.
Fixes https://github.com/letsencrypt/boulder/issues/1047
2015-11-10 19:10:01 -08:00
Jeff Hodges 13cab5c257 add Google Safe Browsing API calls
This allows us to call the Google Safe Browsing calls through the VA.

If the RA config's boolean UseIsSafeDomain is true, the RA will make the RPC
call to the VA during its NewAuthorization.

If the VA config's GoogleSafeBrowsingConfig struct is not nil, the VA
will check the Google Safe Browsing API in
VA.IsSafeDomain. If the GoogleSafeBrowsingConfig struct is nil, it will
always return true.

In order to actually make requests, the VA's GoogleSafeBrowsingConfig
will need to have a directory on disk it can store the local GSB hashes
it will check first and a working Google API key for the GSB API.

Fixes #1058
2015-11-06 16:37:34 -08:00
Jacob Hoffman-Andrews 65777155be Remove CNAME/DNAME logic
Fixes https://github.com/letsencrypt/boulder/issues/1048
2015-11-02 15:34:00 -08:00
Roland Shoemaker 6171420108 Golint fixes to builds work 2015-10-18 18:59:05 -07:00
Tom Clegg e38dbb878f Merge branch 'master' into superfluous-port 2015-10-13 18:44:58 -07:00
Tom Clegg 682fab962c 80/443 are the default http/https ports when writing URLs and following redirects, regardless of va.http[s]Port 2015-10-13 06:46:22 -07:00
Jacob Hoffman-Andrews 310343a061 Fix error name and tests. 2015-10-12 17:45:47 -07:00
Jacob Hoffman-Andrews a95c300d8b Switch to using publicsuffix package.
This has two advantages:
- Fixes #901
- Reduces number of allocations and copies for methods that used the previous
  public suffix code.
2015-10-12 16:32:35 -07:00
Tom Clegg eb0ed15031 Use net.SplitHostPort instead of strings.SplitN 2015-10-08 01:07:26 -07:00
Tom Clegg 7f1debb5d1 Use config httpPort and httpsPort for redirects, too 2015-10-08 01:07:05 -07:00
Tom Clegg e881f1a697 Do not add redundant port number to URL and Host header 2015-10-08 00:55:49 -07:00
Richard Barnes ce76fde398 Use strconv.Itoa instead of fmt.Sprintf 2015-10-06 22:35:52 -04:00
Richard Barnes 9e56883dda Change to KeyAuthorization in ra and va 2015-10-03 14:01:24 -04:00
Richard Barnes 8ccf7cf04b Move UnsafeSetChallenge to VA test 2015-10-02 13:45:18 -04:00
Richard Barnes 367973122e Change 'TO DELETE' comments to something more useful 2015-10-01 18:48:15 -07:00
Richard Barnes c9aa6eea8e Improve logging 2015-10-01 18:32:37 -07:00
Richard Barnes 0f4ebae6e0 Address @bifurcation comments 2015-09-29 09:33:44 -04:00
Richard Barnes ea50be6c50 Change 00 to 01, and drop the underscore 2015-09-29 08:57:43 -04:00
Richard Barnes ef8f57863d Re-add old challenge types to VA 2015-09-28 16:05:44 -04:00
Richard Barnes f579863e0e Purge SimpleHTTP and DVSNI from VA 2015-09-28 14:34:03 -04:00
Richard Barnes 1a9fd9b455 Update to latest ACME spec 2015-09-28 10:10:06 -04:00
Richard Barnes 54c924b436 Merge branch 'master' into sig-reuse 2015-09-27 18:29:14 -04:00
Roland Shoemaker 48bbd558a6 Fix imports 2015-09-17 18:20:47 -07:00
Roland Shoemaker 91750d925f Review fixes 2015-09-15 12:02:34 -07:00
Richard Barnes 325190e573 Val -> AuthzKeys in VA 2015-09-10 21:29:04 -04:00
Roland Shoemaker af8299d607 Merge master 2015-09-03 11:36:08 -07:00
Jeff Hodges 7e157a5c1a va: format url as url in errors
When a URL couldn't be connected to in validateSimpleHTTP, the
fmt.Sprintf's using the URL would format it as something like:

    {https  <nil> kuba.us.to:443 .well-known/acme-challenge/-bgTYeerZbjhysBOgwIx_-7uVDnVnsaxagWvCk6lzNc   }

Instead of:

    https://kuba.us.to:443/.well-known/acme-challenge/-bgTYeerZbjhysBOgwIx_-7uVDnVnsaxagWvCk6lzNc

This would show up in errors like:

    Failed authorization procedure. kuba.us.to (simpleHttp): connection :: The server could not connect to the client for DV :: Could not connect to {https  <nil> kuba.us.to:443 .well-known/acme-challenge/-bgTYeerZbjhysBOgwIx_-7uVDnVnsaxagWvCk6lzNc   }

By passing in a plain URL struct to
Sprintf(), it wasn't using the *url.URL.String() method, but the
built-in struct formatting.

The fix is simple: make the url variable a `*url.URL` instead of a
`url.URL`.
2015-09-02 12:57:26 -07:00
Roland Shoemaker e798362748 Merge branch 'master' into metrics-cleanup 2015-08-28 16:49:46 -07:00
Roland Shoemaker 88c2f95179 Cleanup authority creation 2015-08-28 15:03:02 -07:00
Roland Shoemaker 764169667e Merge master 2015-08-27 11:21:18 -07:00
Richard Barnes abc3a7b45e Merge master 2015-08-26 15:31:33 -04:00
Jeff Hodges 283d8de59b remove TestMode completely
This removes TestMode from the boulder-va command, from ca.Config
(it was only used in the VA) and gets the integration config to specify
the ports it should use explicitly.

(It also removes a DBDriver field from ca.Config that was left over from
letsencrypt/boulder#624.)

Fixes #627.
2015-08-25 21:57:24 -07:00
Jeff Hodges 5bd820f3c5 avoid copying large ValidationAuthorityImpl struct
Saves some allocations
2015-08-25 21:14:59 -07:00
Richard Barnes c552984784 Merge master 2015-08-25 19:21:02 -04:00
Jeff Hodges fa89973681 remove unused VA.hostnameOverride field 2015-08-25 13:46:03 -07:00
Richard Barnes 8868ac9dad Remove explicit account key from VA calls 2015-08-25 16:32:32 -04:00
Roland Shoemaker c2a57436eb Send A RTT metrics 2015-08-24 12:31:06 -07:00
Roland Shoemaker d6efd496fa Merge master 2015-08-24 12:27:58 -07:00
Jacob Hoffman-Andrews 6f60530781 Add hostnameOverride. 2015-08-21 16:09:57 -07:00
Jacob Hoffman-Andrews efa94628c7 Refactor VA test to use Go's httptest.
Previously the VA test had race conditions where the various test servers would
not shut down before the next test started its own server, and the necessary port
wouldn't be available.

Go's httptest makes shutdown simpler, and also chooses a random port, which
further helps avoid collisions.

This change required refactoring the VA to specify the ports for various
challenges as fields. This should allow us to fully remove the TestMode bool in
a subsequent change.

Credit to jmhodges for the first version of this patch.
2015-08-21 16:07:10 -07:00
Roland Shoemaker 60274cd915 Rebase fixes 2015-08-13 22:55:58 -07:00
Roland Shoemaker f15402282c Review rework
Refactor DNS problem details use

Actually store and log resolved addresses

Less convuluted get adresses function/usage

Store redirects, reconstruct transport on redirect, add redirect + lookup tests

Add another test

Review fixes

Initial bulk of review fixes (cleanups inc)

Comment cleanup

Add some more tests

Cleanups

Give addrFilter a type and add the config wiring

Expose filters

LookupHost cleanups

Remove Resolved Addresses and Redirect chain from replies to client without breaking RPC layer

Switch address/redirect logging method, add redirect loop checking + test

Review fixes + remove IPv6

Remove AddressFilter remnant + constant-ize the VA timeout

Review fixes pt. 1

Initialize validation record

Don't blank out validation reocrds

Add validation record sanity checking

Switch to shared struct

Check port is in valid range

Review fixes
2015-08-13 22:49:33 -07:00
Tom Clegg 84757bea8a Change remote IP address without changing requested URL. 2015-08-13 22:45:19 -07:00
Roland Shoemaker 9a328b4fd1 Log IPs in a better place, by storing them in the challenge objects! 2015-08-13 22:45:19 -07:00
Roland Shoemaker 6a75eb199e Resolve validation hostnames and log addresses, use first resolved address to construct validation address 2015-08-13 22:45:19 -07:00
Roland Shoemaker 6970caa0e8 Various cleans and documentation fixes 2015-08-11 18:00:47 -07:00
Roland Shoemaker 8789f925cc Merge master 2015-08-11 16:39:31 -07:00