Commit Graph

57 Commits

Author SHA1 Message Date
Roland Shoemaker 7e6a9ef562 Merge branch 'master' into mailer-fixes 2016-01-06 15:10:12 -08:00
Jeff Hodges adbbbec962 Merge branch 'master' into retry_dns 2016-01-04 16:38:27 -08:00
Alex Gaynor cbeffe96a6 Fixed a bunch of typos 2016-01-04 18:39:34 -05:00
Alex Gaynor b34aeccb42 Fixed a typo in a comment 2016-01-04 18:16:57 -05:00
Jeff Hodges 116ce96326 add retries and context deadlines to DNSResolver
This provides a means to add retries to DNS look ups, and, with some
future work, end retries early if our request deadline is blown. That
future work is tagged with #1292.

Updates #1258
2016-01-04 14:59:10 -08:00
Roland Shoemaker aacafb7ff5 Add unit test 2015-12-29 20:50:26 +00:00
Romain Fliedel 79a7db4213 add dns validation test 2015-12-28 18:02:04 +01:00
Jeff Hodges e36895c9c5 bring RTT metrics inside DNSResolver
This moves the RTT metrics calculation inside of the DNSResolver. This
cleans up code in the RA and VA and makes some adding retries to the
DNSResolver less ugly to do.

Note: this will put `Rate` and `RTT` after the name of DNS query
type (`A`, `MX`, etc.). I think that's fine and desirable. We aren't
using this data in alerts or many dashboards, yet, so a flag day is
okay.

Fixes #1124
2015-12-16 17:41:42 -08:00
Tony Finch ea9cf5cdd0 Validate mail domains in the DNS correctly
The RFC 5321 algorithm is to check the MX records first, and
if they are missing, check for address records. At the moment
we only check A records since there is no IPv6 support.

Fixes #1197
2015-12-11 10:39:07 +00:00
Jacob Hoffman-Andrews 083359a97d Add test for ProblemDetailsFromDNSError.
Also, remove case for temporary errors, which we don't need to handle specially.
2015-11-11 18:05:55 -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
Jacob Hoffman-Andrews 65777155be Remove CNAME/DNAME logic
Fixes https://github.com/letsencrypt/boulder/issues/1048
2015-11-02 15:34:00 -08:00
Richard Barnes 128b784805 Add stats to CA 2015-10-21 17:00:06 -04:00
Richard Barnes 06a743882c Treat all signer errors as HSM errors 2015-10-21 15:24:45 -04:00
Richard Barnes db29b9456d Lint failure 2015-10-21 14:57:04 -04:00
Richard Barnes 28be8023cf Add a mock OCSP signer and better OCSP HSM fault tests 2015-10-21 13:34:43 -04:00
Richard Barnes d1d1690f2a Have the CA recognize and persist HSM faults 2015-10-21 10:46:22 -04:00
Richard Barnes 0fd89d3048 Use a fake clock for the WFE and mock SA 2015-10-20 17:12:59 -04:00
Richard Barnes 35c4f267ec Merge branch 'master' into shorter-expiry-for-pending 2015-10-20 09:21:55 -04:00
Jacob Hoffman-Andrews 2f75214a88 Add limit on number of pending authorizations.
Adds a new method CountPendingAuthorizations to SA.
2015-10-14 13:50:43 -07:00
Jeff Hodges f130ee0d80 Merge branch 'master' into publicsuffix-fix 2015-10-13 14:13:28 -07:00
Jacob Hoffman-Andrews 8bdcfe953a Add a test case for CAA public suffixes. 2015-10-13 13:14:32 -07:00
Roland Shoemaker 1d710f91cd Merge branch 'master' into ocsp-revoke
Conflicts:
	cmd/ocsp-updater/main.go
2015-10-09 15:50:14 -07:00
Richard Barnes c3dacf5dae Make expired authz URLs inaccessible. 2015-10-09 17:45:34 -04:00
Roland Shoemaker 10b6bb5548 Refactor certificate revocation and OCSP generation workflows
* Moves revocation from the CA to the OCSP-Updater, the RA will mark certificates as
  revoked then wait for the OCSP-Updater to create a new (final) revoked response
* Merges the ocspResponses table with the certificateStatus table and only use UPDATES
  to update the OCSP response (vs INSERT-only since this happens quite often and will
  lead to an extremely large table)
2015-10-08 18:55:11 -07:00
Jacob Hoffman-Andrews 487d08ec2e Add rate limiting by registration IP. 2015-10-08 15:47:08 -07:00
Jacob Hoffman-Andrews acdb1fa91b Merge branch 'master' into issued-names-limit-2
Conflicts:
	mocks/mocks.go
	rpc/rpc-wrappers.go
	sa/storage-authority.go
2015-10-07 17:20:36 -07:00
Jacob Hoffman-Andrews 1d91d81158 Implement rate limiting by domain name. 2015-10-04 21:04:26 -07:00
Richard Barnes 498deeb518 Fix golint in ./mocks 2015-10-04 20:37:06 -04:00
Jacob Hoffman-Andrews 6963811ab5 Merge remote-tracking branch 'le/master' into paranoid-key
Conflicts:
	core/util.go
2015-10-01 14:13:05 -07:00
Jacob Hoffman-Andrews 685c6e4206 Use stored key to verify JWS POSTs
instead of submitted key. This minimizes the chances of unexpected JWK fields in
the submitted key altering its interpretation without altering the lookup in the
registrations table.

In the process, fix handling of NoSuchRegistration responses.

Fixes https://github.com/letsencrypt/boulder/issues/865.
2015-09-29 23:37:16 -07:00
Roland Shoemaker 6e3f0e18c6 Merge branch 'master' into cert-limit 2015-09-25 14:08:09 -07:00
Roland Shoemaker 6f41cc9e39 Add issuance rate limiting based on total number of certificates issued in a window
Since the issuance count requires a full table scan a RA process local cache of the
count is kept and expired after 30 minutes.
2015-09-24 12:54:38 -07:00
Jacob Hoffman-Andrews af7f4eb32f Remove GetCertificateByShortSerial. 2015-09-22 16:59:38 -07:00
Jacob Hoffman-Andrews 02314f4041 Implement the new 144-bit mostly-random serial.
To keep the change small, I have not yet completely removed the
GetCertificateByShortSerial method from interfaces and the RPC. I will do taht
in a follow up change.
2015-09-21 13:10:16 -07:00
Roland Shoemaker ff6eca7a29 Submit all issued certificates to configured CT logs
Adds a new service, Publisher, which exists to submit issued certificates to various Certificate Transparency logs. Once submitted the Publisher will also parse and store the returned SCT (Signed Certificate Timestamp) receipts that are used to prove inclusion in a specific log in the SA database. A SA migration adds the new SCT receipt table.

The Publisher only exposes one method, SubmitToCT, which is called in a goroutine by ca.IssueCertificate as to not block any other issuance operations. This method will iterate through all of the configured logs attempting to submit the certificate, and any required intermediate certificates, to them. If a submission to a log fails it will be retried the pre-configured number of times and will either use a back-off set in a Retry-After header or a pre-configured back-off between submission attempts.

This changeset is the first of a number of changes ending with serving SCT receipts in OCSP responses and purposefully leaves out the following pieces for follow-up PRs.

* A fake CT server for integration testing
* A external tool to search the database for certificates lacking a full set of SCT receipts
* A method to construct X.509 v3 extensions containing receipts for the OCSP responder
* Returned SCT signature verification (beyond just checking that the signature is of the correct type so we aren't just serving arbitrary binary blobs to clients)

Resolves #95.
2015-09-17 18:11:05 -07:00
Jacob Hoffman-Andrews f7910753b5 Move MockSA from WFE to mocks. 2015-09-16 12:57:06 -07:00
Roland Shoemaker 725e0e30da Merge branch 'master' into fixed-505 2015-08-21 14:12:36 -07:00
Jeff Hodges 5e97aa23c6 use MariaDB in the unit tests
And delete the uses of sqlite3
2015-08-14 17:13:15 -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
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 bcb0ecb3ba Revert "Resolve and store IP addresses for SimpleHTTP and DVSNI validation (also store redirect chains)" 2015-08-13 13:00:37 -07:00
Roland Shoemaker 8d046a6e0d Review fixes + remove IPv6 2015-08-05 13:47:59 -07:00
Roland Shoemaker 5a1a3c7e0d Give addrFilter a type and add the config wiring 2015-07-31 15:47:03 -07:00
Roland Shoemaker e12564bb11 Initial bulk of review fixes (cleanups inc) 2015-07-30 18:09:16 -07:00
Roland Shoemaker 6777b276a7 Merge branch 'master' into store-ips 2015-07-29 12:24:20 -07:00
Tom Clegg 8ec9723166 Do not test CAA lookup behavior for "CNAME+CAA both exist." 2015-07-27 21:51:14 -04:00
Tom Clegg a843772736 Follow CNAME and DNAME during CAA lookups, cf. RFC 6844. 2015-07-26 01:25:30 -04:00
Tom Clegg d30ea8a4b6 Distinguish between "lookup failed" and "CNAME does not exist" in LookupCNAME. 2015-07-25 05:47:15 -04:00
Roland Shoemaker a960fa0393 Store redirects, reconstruct transport on redirect, add redirect + lookup tests 2015-07-24 12:05:27 -07:00