Commit Graph

178 Commits

Author SHA1 Message Date
Jeff Hodges 92f1689310 make DNS ProblemDetails more clear
Fixes #1259
2015-12-28 13:09:33 -08: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
Jeff Hodges 9ea4ac8b14 return ProblemDetails when validating emails in ra
Fixes #1153
2015-12-15 14:44:19 -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 d5bb20561f Fix nil dereference in AcmeURL unmarshal and in validateContacts. 2015-12-04 09:46:46 -08:00
Jacob Hoffman-Andrews 3ede9b7223 Allow PKCS11 config to be loaded from a file.
This allows secret values (PIN) to be separated from the main config.

Part of #1157.

In the process, move the CA constructor in the direction of
https://github.com/letsencrypt/boulder/wiki/Config-plan:

- Make most fields private.
- Take private key and issuer cert as constructor arguments rather than
  constructing them internally.

This allows the CA test to parse the private key and issuer cert once, rather
than once per test case.
2015-11-27 15:23:31 -08:00
Jacob Hoffman-Andrews d22457cdc1 Add test for core.MalformedRequestError in NewAuth
Also wrap policy errors in a var ( ) and delete old ones.
2015-11-19 16:14:54 -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
Richard Barnes f7a659bcbf Merge branch 'master' into pa-config 2015-11-09 14:42:35 -05:00
EKR b2e7a3354d Fix golint output 2015-11-08 18:21:01 -08:00
Richard Barnes 1f8b60979b Merge branch 'master' into pa-config 2015-11-07 15:33:03 +09: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
Richard Barnes fe047a1da8 Change config to flags from strings 2015-11-03 23:17:26 +09:00
Richard Barnes 36225bdf4f Fix go fmt errors 2015-11-01 22:35:29 +09:00
Richard Barnes f67405bfbc Fix unit test failures and a copy/paste error 2015-11-01 08:28:15 -05:00
Richard Barnes 39dcb9f285 Further unit test fixes 2015-10-31 18:11:08 +09:00
Richard Barnes d8c67285cf Enable configuration of supported challenges 2015-10-31 16:55:59 +09:00
Roland Shoemaker ba56e7c587 Make MatchesCSR downcase CommonName before checking equality 2015-10-21 15:02:15 -07:00
Jessica Frazelle 3ce50c106b
Add test/vars package
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-20 22:29:34 -07:00
Richard Barnes a1ebf51a3c Clean up assertion placement 2015-10-20 17:21:02 -04:00
Richard Barnes 35c4f267ec Merge branch 'master' into shorter-expiry-for-pending 2015-10-20 09:21:55 -04:00
Jacob Hoffman-Andrews dd05ace030 Set up databases with restrictive user permissions.
Fixes https://github.com/letsencrypt/boulder/issues/898

Also removes currently-unused 'development' DB, and do initial migrations in
parallel, which shortens create_db.sh from 20 seconds to 10 seconds.

Changes ResetTestDatabase into two functions, one each for SA and Policy DBs,
which take care of setting up the DB connection using a special higher-privileged
user called test_setup.
2015-10-16 15:50:57 -07:00
Richard Barnes bd1f8d1e42 Fix RA checking and add RA test 2015-10-13 15:50:49 -07:00
bifurcation f6b57a7729 Merge branch 'master' into limit-contacts 2015-10-09 16:41:53 -04:00
Richard Barnes 109f7cf75e Limit the number of contacts per registration 2015-10-09 16:35:19 -04:00
Jeff Hodges 68536ac22a Merge branch 'master' into lower_domains 2015-10-09 13:04:00 -07:00
Jeff Hodges 0df44e5d90 clean up CSRs with capitalized letters
This change lowercases domains before they are stored in the database
and makes policy.WillingToIssue reject any domains with uppercase
letters.

Fixes #927.
2015-10-08 17:04:07 -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
Richard Barnes b01e99ea04 Merge branch 'master' into golint 2015-10-07 10:42:36 -04:00
Jacob Hoffman-Andrews 1899866d6b Add registration-based overrides. 2015-10-06 17:55:21 -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
Richard Barnes 9414b1a37e Address @jmhodges comments and make tests pass 2015-10-03 14:47:17 -04:00
Richard Barnes 9e56883dda Change to KeyAuthorization in ra and va 2015-10-03 14:01:24 -04:00
Richard Barnes eb42a08258 Make RA check sanity and make tests pass 2015-10-03 10:41:23 -04:00
Richard Barnes 4c20bfe310 Merge master to sig-reuse 2015-10-01 18:58:35 -07:00
Richard Barnes 367973122e Change 'TO DELETE' comments to something more useful 2015-10-01 18:48:15 -07:00
Roland Shoemaker 2d0dee4ce1 Daemonize the OCSP updater tool so we are constantly updating OCSP responses.
also moves the first OCSP responses generation from the CA to the OCSP updater. This patch lays the
ground work for moving CT submission and adding CT backfill to the OCSP updater.
2015-10-01 16:36:51 -07:00
Jeff Hodges c24ced260e Merge branch 'master' into cert-limit 2015-10-01 11:11:55 -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 48e7cc71f7 Merge master to sig-reuse 2015-09-28 16:16:11 -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
Roland Shoemaker 96afd94e88 Review fixes
* Rewrite JSONDuration as ConfigDuration that can handle both JSON and YAML unmarshaling
* Factor out RPC certificate count request struct
* Return 429 to WFE on rate limit exceeded
* Fix wonky RateLimitPolicy comment
2015-09-25 14:39:53 -07:00
Jeff Hodges 5383ab4aa9 remove the ca database
The last step of removing the ca incremented serial number generation.

Fixes #813.
2015-09-25 13:50:44 -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
Richard Barnes 31079a49b4 Fix problems 2015-09-23 08:17:53 -07:00