Commit Graph

566 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews be36c3d71d Merge branch 'master' into test-reg-rate-limit-3 2015-10-09 12:48:13 -07:00
Roland Shoemaker 516ba44f38 Actually run the missing SCT receipt loop 2015-10-08 19:27:48 -07: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 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 1238840035 Merge branch 'master' into responder_tests 2015-10-07 11:30:49 -07:00
Richard Barnes b01e99ea04 Merge branch 'master' into golint 2015-10-07 10:42:36 -04:00
Jeff Hodges a9a3a3bcc6 Merge branch 'master' into responder_tests 2015-10-07 07:24:05 -07:00
Jeff Hodges 28a4eecad0 ocsp-responder: error on missing source and tests
We had a staging deploy go bad because of the missing error handling on
the "source" config not being in the JSON. While we debugged, I wrote
some tests.

Fixes #936.
2015-10-06 21:50:44 -07:00
Jacob Hoffman-Andrews 1899866d6b Add registration-based overrides. 2015-10-06 17:55:21 -07: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
Jeff Hodges 5217af94b0 allow whitelisting by a specific reg id
Currently, the whitelisted registration ID is one that is impossible for the
database to return. Once the partner's registration is in place, we can
deploy a change to it.

Fixes #810
2015-10-05 14:11:38 -07:00
Roland Shoemaker 80e455f3de Revert 9ff2696 2015-10-05 13:12:03 -07:00
Roland Shoemaker ea30a46f5d Merge branch 'master' into backfill 2015-10-04 21:41:02 -07:00
Roland Shoemaker 9ff26960dd COUNT and batch SELECTs so each tick all serials are retrieved 2015-10-04 21:40:06 -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 0f3f766d26 Fix golint in ./core 2015-10-04 20:07:13 -04: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
Jacob Hoffman-Andrews a0ba72ea35 Merge branch 'master' into ocsp-decoding
Conflicts:
	test/amqp-integration-test.py
2015-10-01 17:48:26 -07:00
Jacob Hoffman-Andrews 318741a4aa Merge branch 'master' into ocsp-collapse 2015-10-01 17:24:03 -07:00
Roland Shoemaker 9dc7b2d682 Merge master 2015-10-01 17:23:48 -07:00
Jacob Hoffman-Andrews 2eb3550eed Merge branch 'master' into fb-to-statsd 2015-10-01 17:14:24 -07:00
Jacob Hoffman-Andrews 9191aad304 Don't use default handler in ocsp responder. 2015-10-01 16:42:52 -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
Roland Shoemaker 44373307b9 Merge branch 'fb-to-statsd' of github.com:letsencrypt/boulder into fb-to-statsd 2015-10-01 15:50:01 -07:00
Roland Shoemaker 9b0586dfdc Add and use clock 2015-10-01 15:49:50 -07:00
Jeff Hodges eb7f318fdc Merge branch 'master' into fb-to-statsd 2015-10-01 15:40:27 -07: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 a9db85adf2 Merge branch 'master' into paranoid-key 2015-10-01 14:12:38 -07:00
Jeff Hodges c24ced260e Merge branch 'master' into cert-limit 2015-10-01 11:11:55 -07:00
Tom Clegg c56f035cff Merge branch 'master' into 469-fix-cors-headers
Conflicts:
	wfe/web-front-end.go
	wfe/web-front-end_test.go
2015-09-30 07:13:12 -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
Jacob Hoffman-Andrews e97880aaa7 Audit log version info as early as possible.
This means after parsing the config file, setting up stats, and dialing the
syslogger. But it is still before trying to initialize the given server. This
means that we are more likely to get version numbers logged for some common
runtime failures.
2015-09-29 17:16:03 -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 48e7cc71f7 Merge master to sig-reuse 2015-09-28 16:16:11 -04:00
Richard Barnes 24fcc3a760 Make tests pass 2015-09-28 16:05:54 -04:00
Roland Shoemaker 081b81d170 Add a facebookgo/stats client that sends StatsD metrics for facebookgo/httpdown 2015-09-26 21:38:05 -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 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
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
Jacob Hoffman-Andrews 8467745d1e Run gofmt. 2015-09-23 12:26:02 -07:00
Jacob Hoffman-Andrews a04ddf325b Merge branch 'patch-1' of https://github.com/jcjones/boulder into jcj-fixes 2015-09-23 12:19:50 -07:00
J.C. Jones fbd9962b8f Use consistent naming for AMQP queues in the revoker 2015-09-23 12:18:08 -07:00
James 'J.C.' Jones 3506abeeb9 Fix godep import in cmd/va 2015-09-23 12:16:45 -07:00
Jacob Hoffman-Andrews 954004fafb Merge branch 'longserial' of github.com:letsencrypt/boulder into longserial 2015-09-22 16:18:07 -07:00
Jacob Hoffman-Andrews 79e0dfd485 Fix cert-checker for different-length serials. 2015-09-22 16:17:29 -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
Tom Clegg 42958d1aab Merge branch 'master' into 469-fix-cors-headers 2015-09-17 19:19:55 -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 536de0249d Merge master 2015-09-16 18:08:26 -07:00
Roland Shoemaker 4aff9252c5 Add empty test files for external tools so coverage is even sadder 2015-09-15 21:07:36 -07:00
Tom Clegg 38b7bbee97 Merge branch 'master' into 469-fix-cors-headers 2015-09-15 15:49:37 -04:00
Roland Shoemaker f35643bcaf Merge master 2015-09-15 12:05:58 -07:00
Roland Shoemaker 91750d925f Review fixes 2015-09-15 12:02:34 -07:00
Jacob Hoffman-Andrews 47a93ffa5d Merge branch 'master' into deconcurrify_activity_monitor 2015-09-14 11:41:12 -04:00
Richard Barnes 0584cfd53c Typo fix 2015-09-13 22:12:14 -04:00
Richard Barnes a7484fb1e7 Use subjectKeyID instead of authoritKeyID in OCSP responder configuration 2015-09-13 21:05:59 -04: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
Jeff Hodges 99c72b33a9 Merge branch 'master' into deconcurrify_activity_monitor 2015-09-11 15:02:52 -07:00
Jacob Hoffman-Andrews 875a71e53e Fix WFE test properly.
The WFE test relies on a pre-generated cert. Since there are some sanity checks
on the dates in certs, we were getting errors during the test.

One quick fix is to have those sanity checks rely on RA's clock object, which
can be replaced with a fake for testing. In order to do that, I had to move the
sanity check (MatchesCSR) into the registration authority package, where it
makes more sense anyhow.

I also removed a handful of equality testing functions in objects.go that were
only used by MatchesCSR and whose purpose is better served by reflect.DeepEqual.
This was to avoid having to also move those equality testing functions into the
registration authority.
2015-09-11 13:17:18 -04:00
Jeff Hodges e73d053b26 Merge branch 'master' into deconcurrify_activity_monitor 2015-09-10 15:29:38 -07:00
Roland Shoemaker 346a8c1a01 Merge master 2015-09-10 13:47:19 -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
Roland Shoemaker 00905ac07a Move RPCMonitor log to the RPCClient and do the collect natively 2015-09-10 12:48:35 -07:00
Jacob Hoffman-Andrews 253d700d06 Merge branch 'master' into challenge-display-uri
Conflicts:
	cmd/boulder-ra/main.go
	ra/registration-authority.go
	ra/registration-authority_test.go
2015-09-10 15:44:21 -04:00
Jeff Hodges 4ba6f58d32 de-concurrify activity-monitor
The activity monitor spawns a goroutine only to emit some stats. That
goroutine caused some confusion and some other PRs around this code got more
complicated trying to manage the thread-safety.

But the activity-monitor doesn't really need that goroutine to emit its stats. So, we
simplify by removing two letters and a space.
2015-09-10 12:30:23 -07:00
Jacob Hoffman-Andrews 998ffc79cb Do GoodKey checking in WFE. 2015-09-09 20:30:55 -04:00
Jacob Hoffman-Andrews ffcd1c866d Make challenge URI a display-time property.
Challenge URIs should be determined by the WFE at fetch time, rather than stored
alongside the challenge in the DB. This simplifies a lot of the logic, and
allows to to remove a code path in NewAuthorization where we create an
authorization, then immediately save it with modifications to the challenges.

This change also gives challenges their own endpoint, which contains the
challenge id rather than the challenge's offset within its parent authorization.
This is also a first step towards replacing UpdateAuthorization with
UpdateChallenge: https://github.com/letsencrypt/boulder/issues/760.
2015-09-09 16:23:45 -04:00
Jeff Hodges a16567c29b Merge pull request #740 from letsencrypt/checker-fix
Certificate checker fixes
2015-09-08 13:01:43 -07:00
Jacob Hoffman-Andrews 566a8e4189 Merge pull request #739 from letsencrypt/block-more
Check addresses returned from DNS A queries aren't in the loopback block
2015-09-08 11:30:13 -04:00
Roland Shoemaker 5c1ea7a93c Merge master 2015-09-06 15:02:41 -07:00
Roland Shoemaker 1fbcc6c93c Review fixes 2015-09-06 15:00:25 -07:00
Jacob Hoffman-Andrews dda671b282 Merge pull request #746 from letsencrypt/authz_null_expires
allow NULL expires in authz on validation failure
2015-09-04 16:43:28 -04:00
Jeff Hodges 6dcba1ae49 allow NULL expires in authz on validation failure
The RA did not have any code to test what occurred when a challenge
failed. This let in the authz schema change in #705.

This change sets the expires column in authz back to NULLable and fixes
the RA tests (including, using clock.Clocks in the RA).

Fixes #744.
2015-09-04 12:14:24 -07:00
Jeff Hodges 40d1c446d9 correct ca and sa revocation code and tests
The ca's TestRevoke was failing occasionally.

The test was saying "has the certificate's OCSPLastUpdated been set to a
time within the last second?" as a way to see if the revocation updated
the OCSPLastUpdated. OCSPLastUpdated was not being set on revocation,
but the test still passed most of the time.

The test still passed most of the time because the creation of the
certificate (which also sets the OCSPLastUpdated) has usually happened
within the last second. So, even without revocation, the OCSPLastUpdated
was set to something in the last second because the test is fast.

Threading a clock.FakeClock through the CA induced the test to fail
consistently. Debugging and threading a FakeClock through the SA caused
changes in times reported but did not fix the test because the
OCSPLastUpdated was simply not being updated. There were not tests for
the sa.MarkCertificateRevoked API that was being called by
ca.RevokeCertificate.

Now the SA has tests for its MarkCertificateRevoked method. It uses a
fake clock to ensure not just that OCSPLastUpdated is set correctly, but
that RevokedDate is, as well. The test also checks for the
CertificateStatus's status and RevocationCode changes.

The SA and CA now use Clocks throughout instead of time.Now() allowing
for more reliable and expansive testing in the future.

The CA had to gain a public Clock field in order for the RA to use the
CertificateAuthorityImpl struct without using its constructor
function. Otherwise, the field would be nil and cause panics in the RA
tests.

The RA tests are similarly also panicking when the CAImpl attempts to
log something with its private, nil-in-those-tests log field but we're
getting "lucky" because the RA tests only cause the CAImpl to log when
they are broken.

There is a TODO there to make the CAImpl's constructor function take
just what it needs to operate instead of taking large config objects and
doing file IO and such. The Clk field should be made private and the log
field filled in for the RA tests.

Fixes #734.
2015-09-04 11:52:37 -07:00
Roland Shoemaker e5e947ee09 Better construction 2015-09-03 21:00:51 -07:00
Roland Shoemaker 85978dd461 Review fixes and other cleanup 2015-09-03 19:12:51 -07:00
Roland Shoemaker af8299d607 Merge master 2015-09-03 11:36:08 -07:00
Roland Shoemaker 7b2711f56c Remove obsolete comment 2015-09-02 17:48:02 -07:00
Roland Shoemaker 426d08296f Reverse naming order to make more sense 2015-09-02 17:46:39 -07:00
Roland Shoemaker 961231ba48 Protect report entries map with mutex to prevent concurrent writes causing a bad map state 2015-09-02 17:45:19 -07:00
Roland Shoemaker d5599c47c3 Fix expiry period check 2015-09-02 17:38:37 -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
Jeff Hodges f33b103a01 Merge pull request #601 from letsencrypt/blacklist
Use DNS blacklist/whitelist DB
2015-09-02 11:04:31 -07:00
Roland Shoemaker 0ec76a525a Review fixes 2015-09-01 22:05:04 -07:00
Jeff Hodges be44b0bf50 drop unused status column from certificates
Also, use certificateStatus's status in the expiration-mailer join.

Fixes #694.
Fixes #713.
2015-09-01 15:53:27 -07:00
Roland Shoemaker d70ebf6c09 Merge master 2015-09-01 14:39:26 -07:00
Roland Bracewell Shoemaker fe00decc92 Merge pull request #697 from letsencrypt/revoke-split
Split RA revoke method
2015-09-01 14:08:33 -07:00
Roland Shoemaker 3cce4117fa Log errors from cmd.FailOnError 2015-08-31 18:47:16 -07:00
Roland Shoemaker 9e3d971c2d Fix dump and load functions 2015-08-31 16:05:56 -07:00
Roland Shoemaker 98c5bae31d cert-checker fixes 2015-08-31 15:55:10 -07:00
Roland Shoemaker e54d3d322e Merge branch 'master' into blacklist 2015-08-31 15:39:24 -07:00
Roland Shoemaker 1ad7bea579 Move PA construction out of other authority constructors 2015-08-31 15:33:03 -07:00
Roland Shoemaker 273b38e459 Review fixes pt. 1 2015-08-31 14:47:05 -07:00
Roland Shoemaker d11d1ed774 Rename admin-revoker RA call 2015-08-30 22:33:36 -07:00
Roland Shoemaker 0534680907 Merge master 2015-08-30 22:17:14 -07:00
Roland Shoemaker a3c9f60bec Review fixes 2015-08-30 22:15:13 -07:00
Jacob Hoffman-Andrews c9a2afcd8e Merge pull request #688 from letsencrypt/single-ocsp
Add a command to generate a single OCSP response
2015-08-29 15:40:06 -07:00
Richard Barnes 8e44d453ab Adding README 2015-08-29 15:02:06 -04:00
Richard Barnes f7c9835c41 Responses to review comments 2015-08-29 14:51:31 -04:00
Jeff Hodges 417158117e correct bound checking of expirations
The expiration mailer doesn't send email when the expiration is exactly
as far away as one of the "nag" times.

Adds a test for the bound checking behavior.
2015-08-28 22:39:32 -07:00
Jeff Hodges d4df15f604 use Clock in expiration-mailer 2015-08-28 20:40:10 -07:00
Roland Shoemaker e798362748 Merge branch 'master' into metrics-cleanup 2015-08-28 16:49:46 -07:00
Roland Shoemaker 88c2f95179 Cleanup authority creation 2015-08-28 15:03:02 -07:00
Roland Shoemaker f945bb0efb Merge master 2015-08-28 14:41:37 -07:00
Roland Shoemaker 36ee6f6447 Better filename construction 2015-08-28 14:05:12 -07:00
Roland Shoemaker ab86c5b98e Remove debug println 2015-08-28 13:51:12 -07:00
Roland Shoemaker 98ac983df2 Vendor jmhodges/clock 2015-08-28 13:02:35 -07:00
Roland Shoemaker 9bd4db2af6 Switch to jmhodges/clock and other review fixes 2015-08-28 13:01:02 -07:00
Roland Shoemaker e5daa7af74 Add surrogate registration 2015-08-28 00:21:51 -07:00
Roland Shoemaker 7d837fa3aa DB typo 2015-08-28 00:08:50 -07:00
Roland Shoemaker 82ea4aba31 Rest of RPC layer and splitting 2015-08-28 00:00:03 -07:00
Roland Shoemaker 3df37cc3db Merge branch 'master' into cert-checker 2015-08-27 23:26:46 -07:00
Roland Shoemaker 0c4824bf47 Tests 2015-08-27 23:26:24 -07:00
Roland Shoemaker 38a692dbca Batch queries, still need to add non-benchmark tests 2015-08-27 20:28:14 -07:00
Roland Shoemaker a65218ed09 Initial revoke call split work 2015-08-27 19:51:44 -07:00
Richard Barnes 102076f19a Add a test for the single OCSP response generator 2015-08-27 22:05:23 -04:00
Richard Barnes f2cdb7a0f6 Add a command to generate a single OCSP response 2015-08-27 22:04:54 -04:00
Roland Shoemaker 5e00daa5a4 Merge branch 'master' into log-revoke 2015-08-27 17:09:55 -07:00
Roland Shoemaker a4aa450ee6 Switch to custom revocation code type 2015-08-27 17:09:41 -07:00
Roland Shoemaker d6b09c2cf9 Clean up 2015-08-27 14:50:00 -07:00
Roland Shoemaker 0f1efe55ae Log information about revocation procedure 2015-08-27 13:00:55 -07:00
Roland Shoemaker 764169667e Merge master 2015-08-27 11:21:18 -07:00
Jacob Hoffman-Andrews 26b250c359 Make expiration mailer test unflaky.
Previously the expiration times were right on the cusp of being included or not
included in the query. Adjusted the times to be solidly in the right range.
In a future PR, we should refactor the code to generate absolute expiration
times and have findExpiringCertificates take a time param, so the test isn't
dependent on time.Now().
2015-08-27 00:12:07 -07:00
Roland Shoemaker 11ecda5356 Standardized checkPeriod 2015-08-26 14:27:09 -07:00
Roland Shoemaker 0689a962ee Merge master 2015-08-26 12:11:43 -07:00
Roland Shoemaker 2f406e2af0 Merge branch 'master' into blacklist 2015-08-26 12:09:21 -07:00
Roland Shoemaker 0e1e38011a Review fixes pt. 2 2015-08-26 12:09:15 -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
Jeff Hodges 5bd820f3c5 avoid copying large ValidationAuthorityImpl struct
Saves some allocations
2015-08-25 21:14:59 -07:00
Roland Shoemaker be751bd948 Merge master 2015-08-25 16:52:24 -07:00
Roland Shoemaker 1e1a1c0eae Review fixes pt. 1 2015-08-25 16:45:40 -07:00
Roland Shoemaker a053d543e3 Merge branch 'master' into cert-checker 2015-08-25 12:23:26 -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 3cf1ea8e38 Cleaner/quicker rule list search & properly cleanup database 2015-08-24 15:46:37 -07:00
Jacob Hoffman-Andrews 9b9dd76f54 Fix flaky OCSP.
If two OCSP responses were generated in the same second, the earlier would
previously take priority sometimes, leading to a "good" response for revoked
certificates and causing the OCSP integration test to be flaky.
2015-08-24 15:31:26 -07:00
Roland Shoemaker d6efd496fa Merge master 2015-08-24 12:27:58 -07:00
Roland Shoemaker 21cd857f63 Review fixes pt. 2 2015-08-24 12:23:20 -07:00
Roland Shoemaker 37b28a20c0 Merge master 2015-08-24 12:20:26 -07:00
Roland Shoemaker 08068642cf Review fixes 2015-08-24 12:19:46 -07:00
Roland Shoemaker 7ad8847ba2 Standardize CLI UX 2015-08-23 23:17:14 -07:00
Roland Shoemaker 5e53196bfd Actually save the report file (might want to not save entries for valid certs though...) 2015-08-20 17:33:04 -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 00307fd2ef Various standardizations and README updates
Update README.md

Finish readme fixes
2015-08-15 22:57:39 -07:00
Roland Shoemaker 58d6f97860 Pull out policy db junk 2015-08-15 22:27:11 -07:00
Roland Shoemaker 370cd07bc9 Move rpc delivery timing stuff to new metrics lib 2015-08-15 22:25:52 -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
Jacob Hoffman-Andrews 64987a3639 Merge pull request #599 from letsencrypt/mysql
use MariaDB in integration tests and start.py
2015-08-11 20:31:46 -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 c01c8a069b Use natural sort 2015-08-11 11:50:38 -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
Roland Shoemaker 5540729b56 Finished policy-loader 2015-08-10 14:32:53 -07:00
Roland Shoemaker 541971471a Flesh out the policy db loader tool 2015-08-10 13:58:32 -07:00
Jeremy Gillula d7b0b11648 Fixing more merge issues 2015-08-10 12:19:04 -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
Jeff Hodges b08e6e0bad use MariaDB in integration tests and start.py
This changes moves from using SQLite in the integration tests and in the
test/boulder-config.json.

It does not port the unit tests over, unfortunately. That's a much more
invasive change.

This also updates the Dockerfile to include the MariaDB and RabbitMQ
requirements of start.py as well as adjusts the CMD to expose the
boulder server to the host machine. The Dockerfile also needed to have
its Go version bumped and the test.sh had to grow some explict
"function"s.

Updates #132
2015-08-07 23:22:52 -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
Roland Shoemaker ab2a7fce28 Merge branch 'master' into blacklist 2015-08-06 16:11:54 -07:00
Roland Shoemaker a888baf488 Initial PADB work for white/blacklists 2015-08-06 16:09:54 -07:00
Roland Shoemaker 461725bc48 Merge pull request #588 from letsencrypt/exp_mailer_db
use GetRegistration RPC outside of SA
2015-08-06 14:07:31 -07:00
Jeff Hodges 4ea94ee67f correct queue names in AdminRevoker and Exp Mailer 2015-08-06 13:52:46 -07:00
Roland Shoemaker 5f97c6752a Merge pull request #585 from letsencrypt/acme_url
use pointer to AcmeURL everywhere
2015-08-06 10:59:50 -07:00
Jeff Hodges c0de206f29 fix a go vet warning in expiration-mailer 2015-08-06 02:49:04 -07:00
Jeff Hodges 1c08a27748 use GetRegistration RPC outside of SA
We move the admin-revoker and expiration-mailer to using the
SA.GetRegistration RPC method instead of digging into the database
itself.

This allows the hiding of the registration model layer inside of SA, so
we can do fancy things with sha256 for the unique index inside of
it. This will happen in a later commit. See #579.

By exposing fewer details about how Registration is stored, we gain more
flexibility to fix up how its stored.

In the expiration-mailer, the performance hit for the early filtering of
mailto is likely neglibible and possibly even a benefit given the cost
of joins to the memory of MySQL.

If need be, we can built a bulk RPC layer for SA that provides the data
we need in findExpiringCertificates. It'll be easier than trying to
scale and change the storage layer underneath for each consumer.
2015-08-06 02:10:54 -07:00
Jeff Hodges 0f03494d56 use pointer to AcmeURL everywhere
This has the benefit of not requiring us to copy very fat url.URL
objects when we pass them to funcs or call their methods.
2015-08-05 18:23:38 -07:00