Commit Graph

89 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews 231129bb78 Pull out WFE's MockCA into a shared mock.
Also:

- Use MockCA in the RA test instead of a real CA.
- Since the mock CA doesn't write to an SA, remove a part of the RA test that
checked that the certificate was written. That code is already tested in the CA,
where the test belongs.
- Format the constants in RA test to be more copy-and-pasteable.
- Remove Printf in mocks/log.go and test/db.go to make failed test output more readable.
2016-03-20 17:23:15 -07:00
Roland Shoemaker 00b617b59a Switch to upstream square/go-jose + pull latest 2016-03-15 13:54:22 -07:00
Kane York 21700ffec5 Improve mocks.Mailer to check To: line 2016-03-14 17:08:44 -07:00
Kane York 91bc75b0e3 Add GetValidAuthorizations to batch authz checks
By performing only one query to MySQL, we should be able to avoid
blowing the timeouts.

Fixes #1567
2016-03-11 10:26:55 -08:00
Roland Shoemaker 56c45d1330 Bypass per domain rate limit if FQDN set was previously issued
In ra.checkCertificatesPerName allow a bypass of the rate limit
if the exact name set has previously been issued for. This should
make a few current scenarios people have been running into slightly
less painful.
2016-03-09 13:03:07 -08:00
Roland Shoemaker c4dd3506aa Remove CA HSM lockout and make the OCSP updater CA backoff more HSM specific 2016-03-01 14:22:12 -08:00
Roland Shoemaker e4a18a8738 Review fixes 2016-02-26 14:20:06 -08:00
Roland Shoemaker 8fb87b7e7f Add exact FQDN set rate limit
Adds a new rate limit, certficatesPerFQDNSet, which counts certificates
with the same set of FQDNS using a table containing the hash of the dNSNames
mapped to a certificate serial. A new method is added to the SA in AddCertificate
to add this hash to the fqdnSets table, which is gated by a config bool.
2016-02-19 15:58:07 -08:00
Jessica Frazelle 3df2e942be
go fmt fixes
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-02-16 12:19:15 -08:00
Hugo Landau d21f6e3d21 Update vendorized cfssl (OCSP extension support)
Since CFSSL now supports OCSP extensions, it should be updated in
preparation for OCSP SCT stapling. Also updates CFSSL dependency
golang.org/x/crypto, including golang.org/x/crypto/ocsp.

Mocks updated to reflect interface change in cfssl.
2016-02-07 12:14:59 +00:00
Roland Shoemaker c3a6a837a4 Merge branch 'master' into more-revoker 2016-02-01 15:38:05 -08:00
Jeff Hodges 8e8161f94b dedup emails sent to same reg in given batch
This deduplicates the certificate expiration emails sent to a given
registration in a given batch defined by the Mailer.CertLimit option.

Fixes #1358.
2016-01-27 20:39:52 -08:00
Roland Shoemaker 199e0f6e8d Review fixes 2016-01-15 13:51:14 -08:00
Roland Shoemaker 11661bab9e Merge branch 'master' into more-revoker 2016-01-15 13:41:55 -08:00
Hugo Landau 5c9be5385b ECDSA account key support 2016-01-14 06:56:35 +00:00
Roland Shoemaker a77c8e3d5b Switch to single RevokeAuthorizationsByDomain SA method 2016-01-12 11:49:51 -08:00
Roland Shoemaker cbdf0444b6 review fixes 2016-01-08 16:21:12 -08:00
Jacob Hoffman-Andrews 40167f3da3 Merge remote-tracking branch 'le/master' into dns-errors-fix
Conflicts:
	bdns/dns.go
	bdns/dns_test.go
	mocks/mocks.go
	ra/registration-authority.go
	ra/registration-authority_test.go
2016-01-08 14:07:05 -08:00
Jeff Hodges 84b48d1278 Merge branch 'master' into mailer-fixes 2016-01-06 20:04:24 -08:00
Roland Shoemaker 7e6a9ef562 Merge branch 'master' into mailer-fixes 2016-01-06 15:10:12 -08:00
Roland Shoemaker b4c761aa5d Merge branch 'master' into dns-meta 2016-01-06 15:09:28 -08:00
Jeff Hodges 9913eb61ba Merge branch 'master' into more-revoker 2016-01-04 17:02:51 -08:00
Jeff Hodges adbbbec962 Merge branch 'master' into retry_dns 2016-01-04 16:38:27 -08:00
Jeff Hodges a00094faa8 Merge branch 'master' into dns-meta 2016-01-04 16:16:33 -08:00
Jacob Hoffman-Andrews df4ba7aaa8 Report DNS errors properly.
Previously we would return a detailed errorString, which ProblemDetailsFromDNSError
would turn into a generic, uninformative "Server failure at resolver".

Now we return a new internal dnsError type, which ProblemDetailsFromDNSError can
turn into a more informative message to be shown to the user.
2016-01-04 16:07:02 -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 2e91b6515b Merge branch 'master' into dns-meta 2016-01-04 14:55:39 -08:00
Roland Shoemaker d18b8a536d Add DNS ValidationRecord metadata 2016-01-04 12:20:45 -08:00
Roland Shoemaker 4512f764cb Add mocks 2016-01-04 11:54:38 -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