Commit Graph

144 Commits

Author SHA1 Message Date
Tom Clegg 87dd8a4c44 Merge branch 'master' into 469-fix-cors-headers 2015-10-02 01:37:59 -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
Tom Clegg a49e54cfc3 Merge branch 'master' into 469-fix-cors-headers
Conflicts:
	wfe/web-front-end.go
2015-09-28 20:02:44 -07: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
Roland Shoemaker 6e3f0e18c6 Merge branch 'master' into cert-limit 2015-09-25 14:08:09 -07:00
Jeff Hodges 9026378031 Merge branch 'master' into cert-limit 2015-09-25 11:27:33 -07:00
Jeff Hodges 601cf9f0fb add Cache-Control headers to ocsp-responder
Also, adds a JSONDuration to clean up some of the config code. It will
get used more in later PRs.

Fixes #797
2015-09-25 11:26: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
Jacob Hoffman-Andrews 3bec0076cd Use file URLs for static responders. 2015-09-24 10:11:20 -07:00
Jacob Hoffman-Andrews 540c792474 Add an OCSP responder that serves from a file.
This is useful for intermediate and root OCSP, which are generated manually one
a year.
2015-09-23 16:34:13 -07:00
Roland Shoemaker 4a47aaed51 Merge master 2015-09-22 14:07:07 -07:00
Roland Shoemaker 91724296a8 Use facebooks gracefully shutting down HTTP server for WFE & OCSP-Responder 2015-09-21 20:43:38 -07:00
Jacob Hoffman-Andrews d05b9b833f Update cfssl to latest master.
This pulls in the pkcs11key change from
https://github.com/cloudflare/cfssl/pull/330, and updates the Boulder code to
match.

Note: This change overwrites the local changes to our vendored CFSSL made in
https://github.com/letsencrypt/boulder/pull/784. That's intentional: The
upstream changes in https://github.com/cloudflare/cfssl/pull/330 accomplish the
same thing, more cleanly.
2015-09-20 20:44:44 -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
Roland Shoemaker f35643bcaf Merge master 2015-09-15 12:05:58 -07:00
Tom Clegg 62f7e6e530 Add config entry for allowed origins. 2015-09-12 01:39:55 -04:00
Jacob Hoffman-Andrews 43217216c7 use slot ids in the cfssl pkcs11 api
It was using TokenLabels solely to select slots but those can have duplicates
on the same HSM. Instead, use slot IDs with them.
2015-09-11 17:02:48 -07:00
Roland Shoemaker a4fbcdd65a Update naming conventions 2015-09-10 13:10:51 -07:00
Roland Shoemaker 871a77c4b8 Merge master 2015-09-10 13:00:52 -07:00
Jacob Hoffman-Andrews 998ffc79cb Do GoodKey checking in WFE. 2015-09-09 20:30:55 -04:00
Roland Shoemaker af8299d607 Merge master 2015-09-03 11:36:08 -07:00
Roland Shoemaker 37517052c7 Add checks for addresses in the loopback block and a bool to allow them for testing 2015-09-02 15:25:21 -07:00
Roland Shoemaker d70ebf6c09 Merge master 2015-09-01 14:39:26 -07:00
Roland Shoemaker 3cce4117fa Log errors from cmd.FailOnError 2015-08-31 18:47:16 -07:00
Roland Shoemaker e54d3d322e Merge branch 'master' into blacklist 2015-08-31 15:39:24 -07:00
Roland Shoemaker a3c9f60bec Review fixes 2015-08-30 22:15:13 -07:00
Roland Shoemaker e798362748 Merge branch 'master' into metrics-cleanup 2015-08-28 16:49:46 -07:00
Roland Shoemaker 3df37cc3db Merge branch 'master' into cert-checker 2015-08-27 23:26:46 -07:00
Roland Shoemaker 764169667e Merge master 2015-08-27 11:21:18 -07:00
Roland Shoemaker 0689a962ee Merge master 2015-08-26 12:11:43 -07: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
Roland Shoemaker be751bd948 Merge master 2015-08-25 16:52:24 -07:00
Jeff Hodges 7b6f2894f7 add goose as the migration tool
This has required some substantive changes to the tests. Where
previously the foreign key constraints did not exist in the tests, now
that we use the actual production schema, they do. This has mostly led
to having to create real Registrations in the sa, ca, and ra tests. Long
term, it would be nice to fake this out better instead of needing a real
sa in the ca and ra tests.

The "goose" being referred to is <https://bitbucket.org/liamstask/goose>.

Database migrations are stored in a _db directory inside the relevant
owner service (namely, ca/_db, and sa/_db, today).

An example of migrating up with goose:

    goose -path ./sa/_db -env test up

An example of creating a new migration with goose:

    goose -path ./sa/_db -env test create NameOfNewMigration sql

Notice the "sql" at the end. It would be easier for us to manage sql
migrations. I would like us to stick to only them. In case we do use Go
migrations in the future, the underscore at the beginning of "_db" will
at least prevent build errors when using "..." with goose-created Go
files. Goose-created Go migrations do not compile with the go tool but
only with goose.

Fixes #111
Unblocks #623
2015-08-25 12:02:31 -07:00
Roland Shoemaker d6efd496fa Merge master 2015-08-24 12:27:58 -07:00
Roland Shoemaker 37b28a20c0 Merge master 2015-08-24 12:20:26 -07:00
Roland Shoemaker 7ad8847ba2 Standardize CLI UX 2015-08-23 23:17:14 -07:00
Roland Shoemaker c40cfd4164 Process all certs from the last 90 days, still need to cleanup and write out the report 2015-08-20 13:59:40 -07:00
Roland Shoemaker 213d857026 Initial cert checker work 2015-08-19 19:34:02 -07:00
Roland Shoemaker 58d6f97860 Pull out policy db junk 2015-08-15 22:27:11 -07:00
Roland Shoemaker 2677c4e314 Moved http stuff to metrics library 2015-08-15 22:13:25 -07:00
Roland Shoemaker 796baa0273 Merge master 2015-08-15 18:37:34 -07:00
Roland Shoemaker 4fb747ead1 Merge master 2015-08-15 16:50:57 -07:00
Roland Shoemaker b9913a2b41 Review fixes 2015-08-14 17:14:02 -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 60478f13b0 Merge master 2015-08-14 16:46:09 -07:00
Roland Shoemaker 17fa14264e Switch to separate PA struct 2015-08-14 11:12:59 -07:00
Roland Shoemaker 56aa55208e Add stomped/forgotten PolicyDB config struct
Standardize DB config names

Actually standardize

Yeah really this time
2015-08-14 11:04:17 -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
Roland Shoemaker 62ae2efe95 Fix merge stompage 2015-08-10 15:29:13 -07:00