Commit Graph

207 Commits

Author SHA1 Message Date
Kane York 09db2e5a41 Fix error path call in IssueCertificate rpc wrapper (#1799)
* Fix error path call in IssueCertificate rpc wrapper
* Bump godeps version
2016-05-09 16:01:32 -07:00
Jacob Hoffman-Andrews 9ed8268acd Make authz lookup more efficient (remove ORDER BY) (#1784)
- Improve speed of authz lookup.
- Remove all uses of obsolete GetLatestValidAuthorization
- Update test to call GetValidAuthorizations.
2016-05-05 13:48:32 -07:00
Kane York b7cf618f5d context.Context as the first parameter of all RPC calls (#1741)
Change core/interfaces to put context.Context as the first parameter of all RPC calls in preparation for gRPC.
2016-04-19 11:34:36 -07:00
Jacob Hoffman-Andrews e6c17e1717 Switch to new vendor style (#1747)
* Switch to new vendor style.

* Fix metrics generate command.

* Fix miekg/dns types_generate.

* Use generated copies of files.

* Update miekg to latest.

Fixes a problem with `go generate`.

* Set GO15VENDOREXPERIMENT.

* Build in letsencrypt/boulder.

* fix travis more.

* Exclude vendor instead of godeps.

* Replace some ...

* Fix unformatted cmd

* Fix errcheck for vendorexp

* Add GO15VENDOREXPERIMENT to Makefile.

* Temp disable errcheck.

* Restore master fetch.

* Restore errcheck.

* Build with 1.6 also.

* Match statsd.*"

* Skip errcheck unles Go1.6.

* Add other ignorepkg.

* Fix errcheck.

* move errcheck

* Remove go1.6 requirement.

* Put godep-restore with errcheck.

* Remove go1.6 dep.

* Revert master fetch revert.

* Remove -r flag from godep save.

* Set GO15VENDOREXPERIMENT in Dockerfile and remove _worskpace.

* Fix Godep version.
2016-04-18 12:51:36 -07:00
Kane York 25b45a45ec Errcheck errors fixed (#1677)
* Fix all errcheck errors
* Add errcheck to test.sh
* Add a new sa.Rollback method to make handling errors in rollbacks easier.
This also causes a behavior change in the VA. If a HTTP connection is
abruptly closed after serving the headers for a non-200 response, the
reported error will be the read failure instead of the non-200.
2016-04-12 16:54:01 -07:00
Jacob Hoffman-Andrews ecc04e8e61 Refactor log package (#1717)
- Remove error signatures from log methods. This means fewer places where errcheck will show ignored errors.
- Pull in latest cfssl to be compatible with errorless log messages.
- Reduce the number of message priorities we support to just those we actually use.
- AuditNotice -> AuditInfo
- Remove InfoObject (only one use, switched to Info)
- Remove EmergencyExit and related functions in favor of panic
- Remove SyslogWriter / AuditLogger separate types in favor of a single interface, Logger, that has all the logging methods on it.
- Merge mock log into logger. This allows us to unexport the internals but still override them in the mock.
- Shorten names to be compatible with Go style: New, Set, Get, Logger, NewMock, etc.
- Use a shorter log format for stdout logs.
- Remove "... Starting" log messages. We have better information in the "Versions" message logged at startup.

Motivation: The AuditLogger / SyslogWriter distinction was confusing and exposed internals only necessary for tests. Some components accepted one type and some accepted the other. This made it hard to consistently use mock loggers in tests. Also, the unnecessarily fat interface for AuditLogger made it hard to meaningfully mock out.
2016-04-08 16:12:20 -07:00
Jacob Hoffman-Andrews a181d8b0b6 Fix handling of ErrDuplicate in AddSCTReceipt. 2016-04-04 15:44:11 -07:00
Roland Bracewell Shoemaker 32e9e44906 Remove activity-monitor from the tree
* Axe boulder-am
* Also remove the analysis subpackage and references to it, and remove routingKey from rpc/connection.go

https://github.com/letsencrypt/boulder/pull/1682
2016-04-04 12:19:17 -07:00
Jacob Hoffman-Andrews 4fb0f49be3 Replace CertificateIssuanceError
with MalformedRequestError. The distinction was not useful and was out of line
with similar errors in the CA.
2016-03-27 20:56:55 -07:00
Kane York d778115c5d Add PerformValidation RA→VA rpc call
The RPC call returns only the updated Challenge object instead of the
whole authz, because the VA shouldn't be allowed to update any of the
other fields of the Authorization object.
2016-03-23 10:39:23 -07:00
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