Commit Graph

197 Commits

Author SHA1 Message Date
Roland Shoemaker 00b617b59a Switch to upstream square/go-jose + pull latest 2016-03-15 13:54:22 -07:00
Jacob Hoffman-Andrews aeaf6ba64e Fix RPC wrapper for FQDNSetExists
Error was: "json: Unmarshal(non-pointer rpc.fqdnSetExistsResponse"
2016-03-13 18:41:54 -07:00
Kane York 91bc75b0e3 Add GetValidAuthorizations to batch authz checks
By performing only one query to MySQL, we should be able to avoid
blowing the timeouts.

Fixes #1567
2016-03-11 10:26:55 -08:00
Roland Shoemaker 56c45d1330 Bypass per domain rate limit if FQDN set was previously issued
In ra.checkCertificatesPerName allow a bypass of the rate limit
if the exact name set has previously been issued for. This should
make a few current scenarios people have been running into slightly
less painful.
2016-03-09 13:03:07 -08:00
Roland Shoemaker c4dd3506aa Remove CA HSM lockout and make the OCSP updater CA backoff more HSM specific 2016-03-01 14:22:12 -08:00
Roland Shoemaker cd0132d0a1 Rename RPC request wrapper for CountFQDNSets 2016-02-26 15:43:27 -08:00
Roland Shoemaker bee236af3a Merge branch 'master' into exact-name-rl 2016-02-26 14:20:13 -08:00
Roland Shoemaker e4a18a8738 Review fixes 2016-02-26 14:20:06 -08:00
Kane York db8bea7b05 Specify severity of all log.Audit calls
Fixes #1534
2016-02-25 10:55:01 -08:00
Roland Shoemaker 8fb87b7e7f Add exact FQDN set rate limit
Adds a new rate limit, certficatesPerFQDNSet, which counts certificates
with the same set of FQDNS using a table containing the hash of the dNSNames
mapped to a certificate serial. A new method is added to the SA in AddCertificate
to add this hash to the fqdnSets table, which is gated by a config bool.
2016-02-19 15:58:07 -08:00
Jessica Frazelle 7955e268c7
go lint fixes
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-02-17 11:36:06 -08:00
Jeff Hodges c36bc382dd remove unused CheckCAA RPC
Helpful for #1486 and was already in my local repo.
2016-02-12 13:01:05 -08:00
Roland Shoemaker 199e0f6e8d Review fixes 2016-01-15 13:51:14 -08:00
Roland Shoemaker 11661bab9e Merge branch 'master' into more-revoker 2016-01-15 13:41:55 -08:00
Roland Shoemaker a77c8e3d5b Switch to single RevokeAuthorizationsByDomain SA method 2016-01-12 11:49:51 -08:00
Roland Shoemaker cbdf0444b6 review fixes 2016-01-08 16:21:12 -08:00
Jeff Hodges f6473efcc2 delete ca.RevokeCertificate
Also, delete the unused core.CertificateAuthorityDatabase while we're
here.

Fixes #1319
2016-01-04 23:59:21 -08:00
Jeff Hodges 9913eb61ba Merge branch 'master' into more-revoker 2016-01-04 17:02:51 -08:00
Alex Gaynor cbeffe96a6 Fixed a bunch of typos 2016-01-04 18:39:34 -05:00
Roland Shoemaker 6eb9c87dcb Add RPC to get all authorizations for a domain 2016-01-04 10:56:27 -08:00
Roland Shoemaker 4c47b2aa75 Add RevokeAuthorization RPC method 2015-12-31 16:13:06 +00:00
Jacob Hoffman-Andrews 70ac73ca58 Remove unneeded code in core.
B64enc and B64dec can be replaced by base64.RawURLEncoding.
Thumbprint is now implemented in go-jose, and we have the relevant version
imported already, so we can use that.
SyntaxError isn't used anywhere and can be deleted.
2015-12-17 13:36:24 -08:00
Jacob Hoffman-Andrews 720afe5573 Merge branch 'master' into activity-monitor-bind 2015-12-10 18:21:29 -08:00
Jeff Hodges b19ea71dbf Merge branch 'master' into google-ct 2015-12-04 16:17:27 -08:00
Roland Bracewell Shoemaker 1a8e865a10 Merge branch 'master' into activity-monitor-bind 2015-12-04 11:29:49 -08:00
Jacob Hoffman-Andrews 1b770c3d51 Lower logging level for received RPC messages.
Most of our RPC messages are logged at debug level, but this one was logged at
info level, producing confusing results in log searches.
2015-12-03 16:06:26 -08:00
Jacob Hoffman-Andrews 398ba111c4 Let Activity Monitor re-bind to # on reconnect.
Fixes https://github.com/letsencrypt/boulder/issues/1212.

This exposes a new constructor in amqp-rpc.go specifically for ActivityMonitor,
which overrides the normal routingKey to be the wildcard "#".

It also adds an expvar for the number of messages processed in ActivityMonitor,
and adds an integration test case that checks that ActivityMonitor has received
more than zero messages.
2015-12-01 14:39:53 -08:00
Roland Bracewell Shoemaker f302c50f48 Merge branch 'master' into google-ct 2015-11-30 15:44:24 -08:00
Roland Shoemaker 7e093c3ed4 Merge branch 'master' into google-ct 2015-11-30 12:05:17 -08:00
Jacob Hoffman-Andrews b8a91739e3 Allow AMQP URLs to be loaded from files.
This allows secret values to be separated from the main config.

Part of #1157
2015-11-30 11:50:14 -08:00
Jacob Hoffman-Andrews 9e4b0c1e5b Move RabbitMQ initialization into its own binary.
Previously our executables would all try to declare the boulder exchange on
startup, which may have been leading to some race conditions in Travis. Also,
the Activity Monitor would try to bind a queue to the exchange at startup.
In prod both of these tasks are taken care of administratively, so including
them in the app code was adding unnecessary complexity. It also may have been
part of an issue causing Activity Monitor to fail to start up recently.

Also, turn the Activity Monitor into an RPC service, which gets it reconnects
for free, and add it to startservers.py.
2015-11-29 16:55:03 -08:00
Jeff Hodges 1dc5e53c5a add HTTPStatus to ProblemDetails
For #1161
2015-11-24 23:14:51 -08:00
Jeff Hodges 2114f5d5cc move ProblemDetails into its own package
Part of #1161
2015-11-24 23:14:38 -08:00
Roland Shoemaker 3ae32d4d61 Switch back to using an internal SCT representation to make life easier 2015-11-23 14:27:06 -08:00
Roland Shoemaker 01895a13d0 Switch to google, part 1 2015-11-23 12:42:50 -08:00
Roland Bracewell Shoemaker ef54e932b5 Merge branch 'master' into rpc_problem_details 2015-11-23 11:12:14 -08:00
bifurcation ab19e33fec Merge branch 'master' into rpc-config-timeout 2015-11-21 20:15:42 -05:00
Jeff Hodges c5fdc7f769 allow ProblemDetails to be passed as RPC error
This allows us to return a for-users ProblemDetails from services that
the WFE calls (or services that those services call). Doing so means we
can give better errors to the WFE once we teach the WFE how to pass
along ProblemDetails itself.

This is for #1153 and a few other tickets in the error-messages label.

Fixes #1160
2015-11-20 16:39:51 -08:00
Jacob Hoffman-Andrews bdd3247f47 RPC debug logs don't use base64.
This decreases log size 27% in a simple test, and more importantly makes the
logs human readable and searchable.
Fixes #1031

Also, change corrID to an 8-byte value and break dependency on NewToken().
Fixes #909
2015-11-19 19:03:27 -08:00
Jacob Hoffman-Andrews 5fb7be64b0 Make ServiceQueue a separate config param.
Also, make clientName strings into constants.
2015-11-18 17:40:45 -08:00
Jacob Hoffman-Andrews 7dcfcd7864 Add configurable RPC timeouts per backend.
In the process, break out AMQP config into its own struct, one per service.
The AMQPConfig struct is included by composition in the config structs that need
it. If any given service lacks an AMQP config of its own, it gets a default
value from the top-level AMQP config struct, for deployability reasons.

Tightens the RPC code to take a specific AMQP config, not an over-broad
cmd.Config.

Shortens construction of specific RPC clients so they instatiate the generic
client connection themselves, simplifying per-service startup code.

Remove unused SetTimeout method on RPC clients.
2015-11-17 19:51:51 -08:00
Roland Shoemaker 77109fd60d Review fixes 2015-11-10 12:50:04 -08:00
Roland Shoemaker 88b8eb3480 Add RPC server processing metrics and rename client RPC metrics 2015-11-10 12:02:17 -08:00
Roland Shoemaker 50a770e450 Fix connection test 2015-11-08 18:55:51 -08:00
Roland Shoemaker eb44c76c43 Switch from message type to server queue name 2015-11-08 18:37:57 -08:00
Roland Shoemaker ddb0b23603 Add StatsD metric for lag between message publishing and server processing 2015-11-08 17:46:01 -08:00
Jeff Hodges 13cab5c257 add Google Safe Browsing API calls
This allows us to call the Google Safe Browsing calls through the VA.

If the RA config's boolean UseIsSafeDomain is true, the RA will make the RPC
call to the VA during its NewAuthorization.

If the VA config's GoogleSafeBrowsingConfig struct is not nil, the VA
will check the Google Safe Browsing API in
VA.IsSafeDomain. If the GoogleSafeBrowsingConfig struct is nil, it will
always return true.

In order to actually make requests, the VA's GoogleSafeBrowsingConfig
will need to have a directory on disk it can store the local GSB hashes
it will check first and a working Google API key for the GSB API.

Fixes #1058
2015-11-06 16:37:34 -08:00
Jeff Hodges 09520058e1 remove RPC response chan from pending on timeout
This fixes a memory leak. On every request timeout, the pending map
would not have the have the request's response channel removed and,
instead, would hold on to it for the lifetime of the process. This
change makes sure the response channel is removed on timeout.

That change would cause "misrouted messages" audit logs to occur when a
response was sent back from a server but arrived past the timeout. That
would get pretty noisy. Since we introduced specific client queues, our
"misrouted messages" audit logs in the clients are always timeouts. So,
we solve the noisy log problem by deleting some code.

Fixes #1045.
2015-10-28 20:18:07 -07:00
Jacob Hoffman-Andrews 194e421931 Add reconnects in AMQP. 2015-10-27 19:54:54 -07:00
Richard Barnes 3637dfb0c1 ServiceUnavailableError 2015-10-21 16:25:43 -04:00