Commit Graph

1265 Commits

Author SHA1 Message Date
Roland Shoemaker 1bd02fbeb3 Add comments so lint will shut up 2015-08-06 16:23:11 -07:00
Roland Shoemaker ab2a7fce28 Merge branch 'master' into blacklist 2015-08-06 16:11:54 -07:00
Roland Shoemaker 8ee990b966 typo 2015-08-06 16:11:27 -07:00
Roland Shoemaker a888baf488 Initial PADB work for white/blacklists 2015-08-06 16:09:54 -07:00
Roland Shoemaker c84661ea13 Merge pull request #589 from letsencrypt/sha256_jwk
correct unique indexing of Registrations
2015-08-06 14:59:02 -07:00
Jeff Hodges 390464ddf4 correct unique indexing of Registrations
Fixes #579 (which blocks #132).

This changes the SA to use a unique index on the sha256 of a
Registration's JWK's public key data instead of on the full serialized
JSON of the JWK. This corrects multiple problems:

 1. MySQL/Mariadb no longer complain about key's being larger than the
 largest allowed key size in an index
 2. We no longer have to worry about large keys not being seen as unique
 3. We no longer have to worry about the JWK's JSON being serialized with its inner keys in different orders and causing incorrectly empty queries or non-unique writes.

This change also hides the details of how Registrations are stored in
the database from the other services outside of SA. This will give us
greater flexibility if we need to move them to another database, or
change their schema, etc.

Also, adds some tests for NoSuchRegistration in the SA.
2015-08-06 14:19:19 -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
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 8ad00b0025 Update NewAmqpRPCServer comment 2015-08-05 11:57:44 -07:00
Jacob Hoffman-Andrews 30624a332d Merge pull request #554 from letsencrypt/remove-monolith
Remove monolith
2015-08-05 11:45:44 -07:00
Jacob Hoffman-Andrews 32fcd0e5e9 Merge pull request #582 from letsencrypt/log-status-code
Add status code to test.js output
2015-08-04 17:48:17 -07:00
Jacob Hoffman-Andrews e0c23cd582 Add status code to test.js output. 2015-08-04 17:12:43 -07:00
Roland Shoemaker b495fa835e Remove unnecessary locking stuff, just return 2015-08-04 16:54:54 -07:00
Roland Shoemaker 8e04f64e27 Add missing lock 2015-08-04 16:40:30 -07:00
Roland Shoemaker ee24bd6bd3 typo 2015-08-04 16:35:21 -07:00
Roland Shoemaker 42135038d6 Add missing error catch 2015-08-04 16:28:01 -07:00
Roland Shoemaker 5ac7652ef4 Major rewrite 2015-08-04 16:23:49 -07:00
Jacob Hoffman-Andrews de9e01b461 Merge pull request #578 from letsencrypt/on_error
add newline to cmd failure string
2015-08-04 16:03:06 -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 3d7992ae43 Add HandleInterrupts comment 2015-08-03 17:05:45 -07:00
Roland Shoemaker b4da19fce4 Properly catch RPC server errors 2015-08-03 16:50:31 -07:00
Roland Shoemaker 85d037f7a7 Gracefully shutdown RPC servers 2015-08-03 16:47:47 -07:00
Roland Shoemaker 56b5aeef1a Typo 2015-08-03 11:26:48 -07:00
Roland Shoemaker 5ff3f124e5 Add line to README about start.py 2015-08-03 11:25:12 -07:00
Jacob Hoffman-Andrews 0957227ac3 Merge pull request #567 from letsencrypt/t-switch
Switch to Travis containers
2015-08-03 11:18:10 -07:00
Roland Shoemaker 65df2e9c93 Fix duplicated addons sections 2015-07-31 21:08:28 -07:00
Roland Shoemaker e816ea38e8 Merge pull request #569 from letsencrypt/sa_bucket
remove unused bucket field from SQLStorageAuthority
2015-07-31 14:28:47 -07:00
Jeff Hodges c32790a28c remove unused bucket field from SQLStorageAuthority 2015-07-31 14:05:32 -07:00
Roland Shoemaker c4b31889bd Remove bootstrap 2015-07-31 11:50:02 -07:00
Roland Shoemaker 6530a9d95d Switch to travis containers 2015-07-31 11:45:18 -07:00
Roland Shoemaker 4f04cd8f05 Merge pull request #564 from letsencrypt/logger_panic
panic on errors in initializeAuditLogger
2015-07-31 11:17:18 -07:00
Jeff Hodges 41ea98c443 Merge pull request #560 from letsencrypt/run_build_letsencrypt
clean up and harden build_letsencrypt
2015-07-31 11:06:45 -07:00
Jeff Hodges 99e85bcae7 correct initializeAuditLogger comment 2015-07-31 10:11:37 -07:00
Jeff Hodges 89a881abca Merge pull request #563 from letsencrypt/test_host
add host to travis set up for integration tests
2015-07-31 10:05:28 -07:00
Jeff Hodges 7e9182c2ba panic on errors in initializeAuditLogger
Found when poking at the new containerized Travis CI build with
@rolandshoemaker. This was causing strange panics far away from here
when code would try to log audits when there was no syslog available.
2015-07-31 03:01:21 -07:00
Jeff Hodges ee9c09b6d8 add host to travis set up for integration tests 2015-07-31 02:11:29 -07:00
Jeff Hodges 370d2969cc Merge pull request #562 from letsencrypt/jcj-fixes
Address @jcjones comments on #497
2015-07-30 13:37:19 -07:00
Richard Barnes bef0dbf99a Address @jcj comments on #497 2015-07-30 16:24:07 -04:00
bifurcation 46573e93a2 Merge pull request #497 from letsencrypt/update-challenges
Update challenges to match the spec
2015-07-30 15:06:32 -04:00
Richard Barnes 540de44c81 Fix test failure introduced in merge 2015-07-30 13:56:11 -04:00
Richard Barnes 652702bd7f Merge master 2015-07-30 13:47:10 -04:00
Richard Barnes 48e6f45bf5 Updating go-jose to address panics 2015-07-30 13:45:19 -04:00