Commit Graph

38 Commits

Author SHA1 Message Date
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
Roland Shoemaker 5face2bf08 Merge master 2015-07-23 00:13:24 -07:00
Roland Shoemaker 31f0674f03 Replace net.LookupMX with core.LookupMX using defined resolver 2015-07-21 22:36:29 -07:00
Roland Shoemaker b4c1a3dbc6 Resolve validation hostnames and log addresses, use first resolved address to construct validation address 2015-07-21 19:36:37 -07:00
Jacob Hoffman-Andrews 99c339f850 Merge pull request #498 from tomclegg/490-mock-logs
Add mock for syslog.
2015-07-21 17:40:06 -07:00
Tom Clegg 2d0be62966 Use mock syslog in test suites (except core and log). Drop SwitchLog(). 2015-07-21 17:06:39 -04:00
Tom Clegg bf0142897e Change array to more readable map. 2015-07-21 13:02:16 -04:00
Tom Clegg 1bccb99adf Fix unsafe reuse of log buffer during Clear(). Document safe use of GetAll*(). 2015-07-21 12:08:35 -04:00
Tom Clegg 249664383d Simplify init(). Add UseMockLog(), to mock syslog for an entire test process. 2015-07-19 14:21:48 -04:00
Tom Clegg 0e72f95660 Add mock for syslog. 2015-07-19 05:44:56 -04:00
Roland Shoemaker e50ad76edd Change tests to indicate testing SERVFAIL not DNSSEC 2015-07-08 22:18:38 +01:00
Roland Shoemaker a767daed4d Rebase on #438 and cleanup 2015-07-08 22:07:21 +01:00
Roland Shoemaker 624581518d Consistent domain usage, DNSResolver comment, and empty CAA test 2015-07-07 22:31:44 +01:00
Roland Shoemaker 5b092db5c7 Actually add mock file, and remove unused commented tests 2015-07-07 22:31:44 +01:00