Commit Graph

224 Commits

Author SHA1 Message Date
Tom Clegg 3ad7130c63 Add NagCheckInterval config 2015-10-23 13:36:02 -04:00
Richard Barnes f820d9f29c Address @jsha comments 2015-10-21 21:32:02 -04:00
Richard Barnes 288945217e Allow configuration of the HSM timeout 2015-10-21 17:33:19 -04:00
Roland Shoemaker 4164d28916 Review fixes 2015-10-20 19:21:04 -07:00
Roland Shoemaker d7e707849d Don't bother with all the casting to do math.Min 2015-10-20 19:04:54 -07:00
Roland Shoemaker 547348fc48 Review fix 2015-10-19 16:34:44 -07:00
Roland Shoemaker 087b7a21bb Collect recent average instead of average since start 2015-10-19 15:44:36 -07:00
Roland Shoemaker e08a8f3160 Provide both gauge and counter 2015-10-19 13:54:55 -07:00
Roland Shoemaker 2d320f1dd5 Fix GC pause average mixup and add a few extra GC metrics 2015-10-18 20:15:10 -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 109f7cf75e Limit the number of contacts per registration 2015-10-09 16:35:19 -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 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 e0cdd13bbb Merge branch 'master' into issued-names-limit-2 2015-10-06 16:10:29 -07:00
Richard Barnes f064c6d5c7 Merge branch 'master' to 'sig-reuse' 2015-10-05 23:16:16 -04:00
bifurcation 90050e91f5 Merge branch 'master' into golint 2015-10-05 19:23:24 -04:00
Richard Barnes 4405bc5dbc Address @jsha comments 2015-10-05 19:23:31 -04:00
Roland Shoemaker 686ec016a9 Merge master 2015-10-05 14:23:48 -07:00
Roland Shoemaker ea30a46f5d Merge branch 'master' into backfill 2015-10-04 21:41:02 -07:00
Roland Shoemaker 4a98145992 Review fixes 2015-10-04 21:05:44 -07:00
Jacob Hoffman-Andrews 1d91d81158 Implement rate limiting by domain name. 2015-10-04 21:04:26 -07:00
Richard Barnes 66c5ed1ddd Fix golint in ./cmd 2015-10-04 19:44:11 -04:00
Richard Barnes 31ae51129a Merge branch 'master' into sig-reuse 2015-10-03 14:01:34 -04:00
Roland Shoemaker f0f1e72729 Per binary maxGoroutines 2015-10-02 15:30:21 -07:00
Roland Shoemaker 1c393b06bb Add maximum goroutine limit for RPC servers 2015-10-02 15:21:17 -07:00
Roland Shoemaker 414e49921b Review fixes 2015-10-02 15:09:05 -07:00
Roland Shoemaker 356a2525f3 Add CT backfill loop to OCSP-Updater 2015-10-02 12:24:23 -07:00
Tom Clegg 87dd8a4c44 Merge branch 'master' into 469-fix-cors-headers 2015-10-02 01:37:59 -07:00
Richard Barnes 4c20bfe310 Merge master to sig-reuse 2015-10-01 18:58:35 -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
Richard Barnes 24fcc3a760 Make tests pass 2015-09-28 16:05:54 -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
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
Roland Shoemaker b01ee02d35 Merge master 2015-08-10 15:13:47 -07:00
Jeremy Gillula e9b24cfafd Merge remote-tracking branch 'origin/master' into existing-cert
Conflicts:
	cmd/boulder-ra/main.go
	cmd/boulder/main.go
	cmd/shell.go
	core/objects.go
	policy/policy-authority_test.go
	test/boulder-config.json
2015-08-10 12:02:01 -07:00
Roland Shoemaker 6315068ead Merge master 2015-08-10 11:58:02 -07:00
Roland Shoemaker 43a40d55c9 Allow whitelist to be enforcable + remove blacklist file 2015-08-10 11:56:49 -07:00
Jeremy Gillula 553b72ed3b gofmt loves to change my whitespace 2015-08-07 14:15:48 -07:00
Jeremy Gillula d9b1f3d453 Added enforcement of AMQPS. If the insecure flag is true, then we also require the URL to be AMQPS and the TLS config info to be set, otherwise we fail out. If insecure is true, then we don't check for anything else. 2015-08-07 14:04:12 -07:00
Roland Shoemaker 1a2825138d Actually wire everything into the PADB 2015-08-06 16:57:38 -07:00
bifurcation bf4ac4f2a2 Merge pull request #575 from letsencrypt/grace
Gracefully shutdown RPC servers on SIGINT/SIGTERM (and move reconnection logic out of binaries)
2015-08-05 15:46:10 -04:00
Roland Shoemaker 5ac7652ef4 Major rewrite 2015-08-04 16:23:49 -07:00
Jeff Hodges 1af27c8e9e add newline to cmd failure string 2015-08-04 15:48:48 -07:00
Roland Shoemaker 900a170fcd Review fixes and for loop cleanup 2015-08-04 11:38:16 -07:00
Roland Shoemaker 19c76ac94f Stick with previous method name, add uncommitted comment 2015-08-04 11:27:12 -07:00
Roland Shoemaker c9c05cfb46 Add comments, move reconnection logic out of binaries (except for the WFE which is a weird case) 2015-08-03 23:02:52 -07:00
Roland Shoemaker 85d037f7a7 Gracefully shutdown RPC servers 2015-08-03 16:47:47 -07:00
Jeremy Gillula 289dfeabe6 Fixing go formatting issues (ran go fmt on the files below) 2015-07-28 17:07:36 -07:00
Jeremy Gillula 321d611d20 Forgot to stage some files in last commit 2015-07-28 16:03:40 -07:00
Jeremy Gillula 65c923d547 we now ignore duplicate additions and require three different command line args 2015-07-28 14:03:56 -07:00
Roland Shoemaker 145790d9c3 Review fixes 2015-07-27 12:46:09 -07:00
Roland Shoemaker bd9286dd5b Merge branch 'master' into mailer 2015-07-24 16:36:50 -07:00
Roland Shoemaker 6c2f3ea8cc Merge branch 'master' into mailer 2015-07-23 15:33:43 -07:00