Commit Graph

3216 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 b3bc3d8e41 Add a MaxDBConns config parameter. (#1793) 2016-05-09 14:21:15 -07:00
Kane York 339405bcb9 Look up A and AAAA in parallel (#1760)
This allows validating IPv6-only hosts.

Fixes #593.
2016-05-09 08:38:23 -07:00
Ben Irving a41b1dd091 Update README.md for running certbot_test client (#1795) 2016-05-08 12:28:18 -07:00
Kane York 7a4aa49add Return false when ocsp blob is empty (#1771)
Return false when ocsp blob is empty
2016-05-06 17:22:19 -07:00
Jacob Hoffman-Andrews 7208052ad6 Change paths to match certbot renaming. (#1792) 2016-05-06 15:57:07 -07:00
Roland Bracewell Shoemaker efeb81d4be Use a LimitedReader when reading from HTTP response bodies (#1789)
Instead of ioutil.ReadAll
2016-05-05 13:58:14 -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
Jacob Hoffman-Andrews f776343d4e Remove forked repo godep restore exception. (#1786) 2016-05-05 11:22:17 -07:00
Jacob Hoffman-Andrews eb2367a536 Remove obsolete config line. (#1788)
Also move `issuerDomain` so that diffs between boulder-config.json and
boulder-config-next.json are minimized.
2016-05-05 11:22:06 -07:00
Roland Bracewell Shoemaker 35b6e83e81 Implement CAA quorum checking after failure (#1763)
When a CAA request to Unbound times out, fall back to checking CAA via Google Public DNS' HTTPS API, through multiple proxies so as to hit geographically distributed paths. All successful multipath responses must be identical in order to succeed, and at most one can fail.

Fixes #1618
2016-05-05 11:16:58 -07:00
Jacob Hoffman-Andrews 2c39c684cb Fix HostnamePolicyFile (#1785)
CA was referencing RA's config.
Also, the FailOnError function needs a non-nil error to fail.

* Bump Godep version.
2016-05-04 08:12:08 -07:00
Roland Bracewell Shoemaker 8ee578c3b7 Check JWK is valid before sending to SA (#1782)
Update vendored github.com/square/go-jose
Check key is valid before sending to SA
2016-05-03 14:26:52 -07:00
Kane York fb4955c72a Fix expiration-mailer logspam when all certs are renewed (#1770)
Fix expiration-mailer logspam when all certs are renewed
Fixes #1772
2016-05-02 13:48:28 -07:00
Jacob Hoffman-Andrews e5e4fb744a * Delete Policy DB.This is no longer needed now that we have a JSON policy file.* Fix tests.* Revert Dockerfile.* Fix create_db* Simplify user addition.* Fix tests.* Fix tests* Review fixes.https://github.com/letsencrypt/boulder/pull/1773
* Delete Policy DB.

This is no longer needed now that we have a JSON policy file.

* Fix tests.
* Revert Dockerfile.
* Fix create_db
* Simplify user addition.
* Fix tests.
* Fix tests
* Review fixes.

https://github.com/letsencrypt/boulder/pull/1773
2016-04-29 12:12:24 -07:00
Jacob Hoffman-Andrews f2f3e37b48 Add line to README for GO15VENDOREXPERIMENT. (#1779) 2016-04-29 11:26:33 -07:00
Kane York 801626fb15 Limit the length of logged HTTP response (#1778)
* Limit the length of logged HTTP response

Fixes #1777

* Fix crash, add tests
* Fix utf-8 truncation
* move more logic into helper method
* Add unit test for truncateBody

https://github.com/letsencrypt/boulder/pull/1778
2016-04-29 11:25:51 -07:00
Kane York dc15f6a55e Readd timing stats for VA (#1759)
* Fix newVARPC sanity check logic error

* Redo style of sanity check in RA to match VA

* Switch to ServerInternal(), readd log.Info

* Add tests to make sure correct metric measured

* comments on exported symbols

* review fixes

* build an array instead of storing last
2016-04-27 11:57:21 -07:00
Jacob Hoffman-Andrews 702a0dbb0c Hard-fail godep-restore. (#1767) 2016-04-25 11:49:34 -07:00
Jacob Hoffman-Andrews 6d5348f975 Run go generate in Travis (#1762)
* Fix go generate command in metrics.

The previous command only worked on OS X. This one works on Linux but not
OS X.

Also add generate phase of test.sh.

* Add mockgen to test setup.

* Fix github-pr-status output.

* Fix envvar style.

* Set xtrace.

* Fix test.sh

* Fix test.sh some more.

* Fix mockgen command.

* Add dependencies for running `go generate`.

* Add protoc-gen-go.

* Fix go get command.

* Fix generate.

* Wait for all.

* Fix generate.

* Update generated pb.

* Fix generate commands for vendored world.

* Update documentation for new vendor style.

* Update grpc package to latest.

* Update caaChecker proto with latest.

* Run go generate only over TESTPATHS

* See if Travis passes under 1.6

* Switch back to 1.5.

* Trim run command.

* Run stringer from correct directory.

* Move generate command.

* Restore and generate

* Fix path.

* list contents of GOPATH.

* Fix stringer by prebuilding.

* Try another import path.

* regenerate bcode_string.

* remove excess package

* pull jsha fork of protoc-gen-go that echoes

* Echo protoc version.

* install from source

* CD back.

* Go back to normal protoc-gen-go

* Fix path

* Move protobuf install into test/setup.sh

* Move before_install to install.

* Set PATH.

* Follow 301 with curl.

* Shuffle test order.

* Swap back test order.

* Restore all tests.

* Restore 1.5.3 to Travis.

* Remove unnecessary wait-or-exit

* Generate metrics mock with latest mockgen.

* Wrap TESTPATHS in curlies

* Remove spurious bracket
2016-04-21 15:23:06 -07:00
Jacob Hoffman-Andrews 26de87dfa2 Update grpc dep and regenerate caa-checker. (#1761)
* Update grpc dep and regenerate caa-checker.

The latest version generates a different format. This is a precursor to running
go generate in Travis.
2016-04-21 11:05:17 -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
Kane York 0c1ddccd9c Parallelise email DNS lookup for new-reg (#1731)
* Parallelise email DNS lookup for new-reg

* Remove the 1-case switch
2016-04-19 11:11:07 -07:00
Kane York 37fd71d21e Rework how KeyAuthorization works (#1688)
* Enhance error message in NewKeyAuthFromString

* va: generate expected response and string compare

* NewKeyAuth can return error, handle that...

* wip commit

* convert ch.KeyAuthorization to string and rename

* more wip commit

* wip 3

* wip 4

* delete NewKeyAuthorizationFromString

* change to ServerInternalProblem

* fix compile error

* semantic merge conflicts are the worst

actually compiled this time.

* Replace new error with statsd increment
2016-04-19 10:54:39 -07:00
Roland Bracewell Shoemaker c6de21a53a Fix total DNS latency stat (#1751)
exchangeOne used a deferd method which contained a expression as a argument. Because of how defer works the arguments where evaluated immediately (unlike the method) causing the total latency to always be the same.
2016-04-19 10:36:44 -07:00
bmw ea52c2130b Use tools/venv.sh from client repo in integration tests (#1752) 2016-04-18 16:50:26 -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
Jacob Hoffman-Andrews 9cb9f82516 Revert "Stop fetching master for migrations test. (#1730)" (#1749)
This reverts commit 8c8fc01b01.

It turns out the master fetch actually was necessary in some other cases,
particularly when building non-master branches (as opposed to PRs).
2016-04-18 08:30:58 -07:00
Jakub Warmuz d669b708e2 Custom command for integration-test.py (#1744)
Allows other ACME clients (such as simp_le), to run any command for
integration testing (without having to implement custom busy-wait
loop etc.).
2016-04-17 10:27:05 -07:00
Jakub Warmuz 1b7fd169ba Test ToS at :4000 (#1742)
Fixes #1720
2016-04-16 10:53:02 -07:00
bmw e2e5e05766 Update client package names for integration tests (#1740) 2016-04-15 12:20:56 -07:00
Jacob Hoffman-Andrews 8bea50ca94 Merge pull request #1734 from ibukanov/fix-docker-grpc
under docker make boulder to resolve to 127.0.0.1
2016-04-15 11:46:12 -07:00
alexandru totolici 961651abcb `name` is not a valid docker-compose key (#1737)
The Docker Compose reference does not mention a key for `name`, and I believe the [correct one is `container_name`](https://docs.docker.com/compose/compose-file/#container-name), which is what this small patch changes.

```
± docker-compose build
ERROR: Validation failed in file './docker-compose.yml', reason(s):
Unsupported config option for bmysql: 'name'
Unsupported config option for brabbitmq: 'name'

± docker-compose -version
docker-compose version 1.6.2, build unknown```
2016-04-15 10:32:15 -07:00
Igor Bukanov d206d4b293 under docker make boulder to resolve to 127.0.0.1
This way gRPC can contact the boulder using boulder name inside the container. This fixed a regression from #1647.
2016-04-14 12:00:07 +02:00
Jacob Hoffman-Andrews deb49a4048 Remove CAA timeout warning in VA. (#1729)
Because this event can be caused by end users, we don't want it higher than
Info. Also, it's redundant here: if this winds up being the gating factor, it
will show up in the "Validation result" log entry.
2016-04-13 23:55:42 -07:00
Jacob Hoffman-Andrews ed1018db6a Remove nameset-backfill tool. (#1733) 2016-04-13 23:38:36 -07:00
Jacob Hoffman-Andrews 8c8fc01b01 Stop fetching master for migrations test. (#1730)
It appears this is no longer necessary in Travis.
2016-04-13 17:22:57 -07:00
Roland Bracewell Shoemaker 8eaf247ee9 Split CAA checking out to its own service (#1647)
* Split out CAA checking service (minus logging etc)
* Add example.yml config + follow general Boulder style
* Update protobuf package to correct version
* Add grpc client to va
* Add TLS authentication in both directions for CAA client/server
* Remove go lint check
* Add bcodes package listing custom codes for Boulder
* Add very basic (pull-only) gRPC metrics to VA + caa-service
2016-04-12 23:02:41 -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 e1622fd03f Update CT client to master. (#1725)
This pulls in https://github.com/google/certificate-transparency/pull/1149,
which fixes communication with Google CT logs under Go 1.6 (i.e., using HTTP/2)
2016-04-12 12:57:33 -07:00
Jakub Warmuz 6fdbd2b441 Expose dns-test-srv outside Docker. (#1722)
Use case: ./test/run-docker.sh, then POST https://localhost:8055/set-txt to test development of dns-01 client implementation.
2016-04-11 11:09:03 -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
Roland Bracewell Shoemaker 9ae81ab073 Fix the ORDER BY/OFFSET from the nameset-backfill query (#1711) 2016-04-08 15:07:01 -07:00
Jacob Hoffman-Andrews a3533f0bba Reduce log levels in OCSP responder. (#1702)
* Reduce log levels in OCSP responder.
* Use mock log in test.
* Update upstream cfssl.
2016-04-08 14:41:14 -07:00
Igor Bukanov 75134fc83f Speed up docker build (#1716)
Make COPY and compilation the last commands in the Dockerfile so in the common case Docker will cache results of EXPOSE, WORKDIR and ENV commands. The CMD is eliminated as entrypoint.sh now defaults to start.py if no arguments are given. The patch eliminates setting MYSQL_CONTAINER in run-docker.sh and docker-compose.yaml as entrypoint.sh sets the variable on its own when calling create_db.sh.

In addition the patch passes arguments passed to run-docker.sh as arguments to the entryscript.sh in the container. This way running `./run-docker.sh ./test.sh ...` allows to execute tests locally.
2016-04-08 09:58:50 -07:00
Jacob Hoffman-Andrews 5f2205b804 Allow Must Staple in ECDSA and RSA profiles. (#1713)
* Allow Must Staple in ECDSA and RSA profiles.
* Port recent changes into config-next.
2016-04-07 15:51:16 -07:00
Roland Bracewell Shoemaker d57d4f087e Fix a panic in cert-checker (#1714)
* Fix cert-checker panic

Fixes a silly panic in the cert-checker that would've caused it to fail outside of tests, also fixed the test to catch that silliness.
2016-04-07 14:25:25 -07:00
Kane York 2cd6b6b9c5 reloader: Split data/error callbacks (#1704)
The reloader package currently discriminates between file reading errors (in the reloader package) and data parsing errors (in the client code). Because of this, errors in a hot-replaced policy file may go unnoticed.

The former design, a (data, error) callback is replaced with a data callback and an error callback. This allows for uniform reporting of errors sourced from the library and errors sourced from the user-provided parser.

https://github.com/letsencrypt/boulder/pull/1704
2016-04-07 14:04:03 -07:00
Jacob Hoffman-Andrews 8c915f50f6 Change panics in audit logger to log.Fatalf. (#1695)
* Change panics in audit logger to log.Fatalf.

These errors can happen if the syslog apparatus is unavailable, so are not that
out of the ordinary. log.Fatalf produces less noise and makes it easier to see
what's wrong.

* Fix imports.
2016-04-07 13:47:12 -07:00
Jacob Hoffman-Andrews 48bb42e472 Always use boulder-mysql, not localhost, for mysql.
This followup for #1639 to always use the boulder-mysql, not localhost, when connecting to mysql database when testing.
2016-04-07 13:13:26 -07:00