Commit Graph

140 Commits

Author SHA1 Message Date
Roland Bracewell Shoemaker 887618effc Update github.com/cloudflare/cfssl and github.com/google/certificate-transparency (#2032)
Updates `github.com/cloudflare/cfssl` and `github.com/google/certificate-transparency/go` to current master. CFSSL has re-structured some of the `signer/local` code which should be given a once-over. Otherwise everything seems mostly benign and/or doesn't affect our usage.

Vendored tests pass.
2016-07-12 13:59:50 -07:00
Jacob Hoffman-Andrews d1ff0779c9 Update golang.org/x/crypto/... to latest. (#2040)
Pulls in https://go-review.googlesource.com/#/c/24841/, which fixes
https://github.com/golang/go/issues/16321.
2016-07-12 09:28:30 -04:00
Simone Carletti 7172e49650 Replace x/net/publicsuffix with weppos/publicsuffix-go (#1969)
This PR replaces the `x/net/publicsuffix` package with `weppos/publicsuffix-go`.

The conversations that leaded to this decision are #1479 and #1374. To summarize the discussion, the main issue with `x/net/publicsuffix` is that the package compiles the list into the Go source code and doesn't provide a way to easily pull updates (e.g. by re-parsing the original PSL) unless the entire package is recompiled.

The PSL update frequency is almost daily, which makes very hard to recompile the official Golang package to stay up-to-date with all the changes. Moreover, Golang maintainers expressed some concerns about rebuilding and committing changes with a frequency that would keep the package in sync with the original PSL. See https://github.com/letsencrypt/boulder/issues/1374#issuecomment-182429297

`weppos/publicsuffix-go` contains a compiled version of the list that is updated weekly (or more frequently). Moreover, the package can read and parse a PSL from a String or a File which will effectively decouple the Boulder source code with the list itself. The main benefit is that it will be possible to update the definition by simply downloading the latest list and restarting the application (assuming the list is persisted in memory).
2016-06-30 15:03:14 -07:00
Jacob Hoffman-Andrews fd095b8881 Fix Docker test builds: latest certbot and grpc (#1991)
The `letsencrypt/boulder-tools` image was recently updated, pulling in version
0.8.0 of certbot. That version stores the output of `certonly` requests in a
different path. In test.sh, we check out a specific tagged release of certbot in
order to get its integration tests. Prior to this commit, we were using
certbot 0.8.0 with the integration tests from version 0.6.0 of certbot,
which looked for `certonly` output in the wrong place, and failed.

This commit changes test.sh to checkout the 0.8.0 branch, and also removes a
temporary shim we used to make the `certbot` command call out to the
`letsencrypt` command.

Also, since the latest version of `letsencrypt/boulder-tools` includes an updated
`protoc-gen-go`, this change also updates the support packages to match.
2016-06-29 10:54:03 -07:00
Roland Bracewell Shoemaker 92e0704b1b Allow gRPC clients to connect to multiple backends (#1918)
Fixes #1917 and #1755, also updates google.golang.org/grpc to b60d3e9e.
2016-06-15 16:50:56 -07:00
Kane York 0430c08388 Implement gRPC for VA's RPCs (#1738)
Adds appropriate protobufs, and sets up RA / VA to use the gRPC versions of the calls in boulder-config-next.json.

Fixes #1626.
2016-05-31 16:44:48 -07:00
Roland Bracewell Shoemaker b980e91e5b Bump godep to v66 (#1807) 2016-05-11 09:21:14 -07:00
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
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
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
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
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
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
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 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
Jacob Hoffman-Andrews c7cb3f59ff Update httpdown dependency.
This pulls in a change that removes unnecessary printfs.
2016-03-27 21:01:02 -07:00
Jacob Hoffman-Andrews a8a4ccd51b Merge branch 'master' into update-pkcs11 2016-03-25 18:49:49 -07:00
Kane York e81bee835d Update miekg/pkcs11
Fixes #1632
2016-03-24 13:46:14 -07:00
Jacob Hoffman-Andrews bc134e49d2 Update publicsuffix to latest. 2016-03-23 17:09:51 -07:00
Jacob Hoffman-Andrews 6e7204ec85 Bump Godep version.
Fixes tests.
2016-03-18 11:53:58 -07:00
Roland Shoemaker e37a14a5e5 Add Godep version to Godeps/Godeps.json 2016-03-16 12:36:11 -07:00
Roland Shoemaker 00b617b59a Switch to upstream square/go-jose + pull latest 2016-03-15 13:54:22 -07:00
Kane York 8414987b31 Update cfssl in godeps 2016-02-29 12:09:01 -08:00
Kane York b46b7d0bb4 Switch to letsencrypt copy of pkcs11key
Closes #1527
2016-02-25 10:24:43 -08:00
Roland Shoemaker f7df193235 Update google/certificate-transparency 2016-02-23 11:53:33 -08:00
Jacob Hoffman-Andrews 72b3616cf2 Run godep save -r ./...
This fixes a change in how Godeps.json is generated that was introduced in a
recent godep revision.
2016-02-22 15:05:38 -08:00
Jacob Hoffman-Andrews d1b7528d95 Update go-sql-driver to latest master.
This pulls in support for read timeouts and write timeouts.
2016-02-15 22:32:37 -08:00
Jeff Hodges 2746260194 update cfssl mostly for the Subject.SerialName
Resolves a blocker for #1477
2016-02-10 17:14:41 -08:00
Ricardo Padilha ad7e2cc5fe Merge branch 'master' into master 2016-02-10 12:46:53 -02:00
Hugo Landau d21f6e3d21 Update vendorized cfssl (OCSP extension support)
Since CFSSL now supports OCSP extensions, it should be updated in
preparation for OCSP SCT stapling. Also updates CFSSL dependency
golang.org/x/crypto, including golang.org/x/crypto/ocsp.

Mocks updated to reflect interface change in cfssl.
2016-02-07 12:14:59 +00:00
Ricardo Padilha 68bcee105c publicsuffix: update table to latest list from publicsuffix.org on 2016-01-30
This update comes from this lineage:

- https://github.com/publicsuffix/list:
  24caf4f72bf42a87559685e7211796c94855a90c
- https://go-review.googlesource.com/#/c/19140/:
  6c581b96a7d38dd755f986fcf4f29665597694c0
- https://github.com/letsencrypt/net:
  7eb31e4ef6d2609d3ef5597cbc65cb68c8027f62

Changelog:
- Godeps.json: replaced commit id with 7eb31e4
- _workspace/src/...suffix/table.go: copied from letsencrypt/net@7eb31e4
2016-02-04 08:08:24 -08:00
Marcin Walas 77b771c81e Update publicsuffix dependency 2016-01-21 10:45:12 +01:00
Brett Hoerner 3d7413ae41 Fix invalid Godeps.json 2016-01-11 09:08:17 -06:00
Jeff Hodges 116ce96326 add retries and context deadlines to DNSResolver
This provides a means to add retries to DNS look ups, and, with some
future work, end retries early if our request deadline is blown. That
future work is tagged with #1292.

Updates #1258
2016-01-04 14:59:10 -08:00
Jacob Hoffman-Andrews 8eb6dbae98 Update cfssl to e32101.
Ran tests with:

cd $GOPATH/src/github.com/cloudflare/cfssl
go test ./...

All tests passed.
2016-01-04 14:16:52 -08:00
Jeff Hodges bce554a270 correct publicsuffix import in RA
And remove the incorrectly vendorized code from Godeps.
2015-12-17 12:59:15 -08:00
Jacob Hoffman-Andrews bfd2b075fb Update publicsuffix to latest master. 2015-12-11 11:14:27 -08:00
Jeff Hodges 073121f724 update letsencrypt/go-safe-browsing-api
This should reduce our timeout problem in the VA by not locking out
IsListed requests while the GSB file IO, and looping is occuring. These
changes came in at
https://github.com/letsencrypt/go-safe-browsing-api/pull/2 (also added
to the upstream at
https://github.com/rjohnsondev/go-safe-browsing-api/pull/15).

Fixes #1253
2015-12-10 14:44:25 -08:00
Jacob Hoffman-Andrews f008c46a77 Run godep update and godep save -r.
Also, remove cache-control code from ocsp-responder, since caching headers are
now handled in cfssl.
2015-11-20 16:48:43 -08:00
Jacob Hoffman-Andrews cb2f7bc057 Update cfssl to latest master.
Pulls in:

Omit empty qualifiers in Certificate Policies. cloudflare/cfssl#431
Set caching headers in OCSP responder cloudflare/cfssl#425
Remove extraneous debugging statement. cloudflare/cfssl#423
2015-11-20 14:06:15 -08:00
Jacob Hoffman-Andrews 47e502bf35 Update miekg/dns to latest master.
Fixes https://github.com/letsencrypt/boulder/issues/1176
2015-11-20 10:35:29 -08:00
Richard Barnes 604f629957 Update to latest go-jose 2015-11-18 21:37:33 -08:00
Richard Barnes 8f6a95f9a8 Update go-jose 2015-11-17 13:50:17 -08:00
Jeff Hodges 7bd22352ba fix le fork of go-jose again 2015-11-13 14:48:05 -08:00
Jeff Hodges d84f2e3c32 add Godeps for Google Safe Browsing PR
This is for making PR #1093 smaller.

Updates #1058
2015-11-05 17:27:55 -08:00
Jeff Hodges bb27f3baee godep update github.com/letsencrypt/go-jose
This is like #1103 which was for #1058.

It includes the deletion of test files owing to tools/godep/312 but is
fine since we don't use them.
2015-11-05 16:43:15 -08:00
Jacob Hoffman-Andrews 040e617807 Fix sha1's for vendorized CFSSL deps.
Previously our Godeps listed a sha1 that pointed at a merge commit existing only
on the Let's Encrypt fork of CFSSL, making it impossible to do a godep save if
you didn't have a copy of that fork available out in
$GOPATH/src/github.com/cloudflare/cfssl (e.g. via multiple remotes).

This change updates that sha1 to the corresponding merge commit that exists in
the upstream CFSSL.
2015-11-05 15:46:18 -08:00
Jacob Hoffman-Andrews 7f80c07e58 Update publicsuffix to latest.
Fixes https://github.com/letsencrypt/boulder/issues/1090
Part of https://github.com/letsencrypt/boulder/issues/1058
2015-11-04 16:46:46 -08:00
Jacob Hoffman-Andrews 194e421931 Add reconnects in AMQP. 2015-10-27 19:54:54 -07:00
Jacob Hoffman-Andrews 734b85ecd1 Update publicsuffix to latest.
Pulls in https://github.com/letsencrypt/net/pull/2,
which fixes https://github.com/letsencrypt/boulder/issues/1010.

Updating vendorized deps means running tests. I ran this and it passed:

cd ~/go/packages/src/github.com/letsencrypt/net/
go test ./publicsuffix/
2015-10-20 12:37:31 -07:00
Jacob Hoffman-Andrews a95c300d8b Switch to using publicsuffix package.
This has two advantages:
- Fixes #901
- Reduces number of allocations and copies for methods that used the previous
  public suffix code.
2015-10-12 16:32:35 -07:00
Jacob Hoffman-Andrews 903f39508e Vendorize publicsuffix. 2015-10-04 21:04:29 -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
Jeff Hodges 7a3d5ebb26 Merge branch 'master' into update-cfssl 2015-10-01 15:41:27 -07:00
Jacob Hoffman-Andrews 1975e417e0 Update CFSSL.
This pulls in a few cfssl upstream fixes:

cloudflare/cfssl#347: Fix CKA_ALWAYS_AUTHENTICATE check
cloudflare/cfssl#344: Allow client to specify full serial.
cloudflare/cfssl#340: OCSP doesn't include CA when unnecessary.

This also updates boulder-ca to use the new full-serial API in CFSSL.

I have run tests for cfssl and they pass:

cd ~/go/packages/src/github.com/cloudflare/cfssl/
go test ./...
2015-10-01 13:45:59 -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
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
Richard Barnes 6391112f42 godep update golang.org/x/crypto/ocsp 2015-08-29 15:04:44 -04:00
Roland Shoemaker 98ac983df2 Vendor jmhodges/clock 2015-08-28 13:02:35 -07:00
Jacob Hoffman-Andrews 0e0f709cfe Update CFSSL.
This pulls in https://github.com/cloudflare/cfssl/pull/312, which fixes a bug
that was causing us to generate not-yet-valid OCSP.
2015-08-19 22:05:05 -07:00
Jeff Hodges f7ebed875c update github.com/miekg/dns
This is needed for the race condition that errors in our test suite on
Go 1.5rc1 that was fixed in https://github.com/miekg/dns/pull/245
2015-08-13 14:50:58 -07:00
Richard Barnes 4aef1ad2fb godep update golang.org/x/crypto/ocsp 2015-08-12 08:52:55 -07:00
Richard Barnes 48e6f45bf5 Updating go-jose to address panics 2015-07-30 13:45:19 -04:00
Richard Barnes 76a2e15958 Godep refresh after landing changes in github.com/letsencrypt/go-jose 2015-07-29 13:56:49 -04:00
Romain Fliedel d115e5cb60 Resync with latest letsencrypt/go-jose to fix jwk encoding. 2015-07-28 16:25:30 +02:00
Jacob Hoffman-Andrews 9423467142 Switch to our own fork of go-jose.
This is the result of `godep save -r ./...` and
`git rm -r -f Godeps/_workspace/src/github.com/square`

Our fork is currently at the head of go-jose when Richard made the local nonce
changes, with the nonce changes added on top. In other words, the newly created
files are exactly equal to the deleted files.

In a separate commit I will bring our own go-jose fork up to the remote head,
then update our deps.

Also note: Square's go-jose repo contains a `cipher` package. Since we don't
make any changes to that package, we leave it imported as-is.
2015-07-24 14:39:00 -07:00
Jacob Hoffman-Andrews 8092b42dd6 Merge pull request #525 from letsencrypt/update-cfssl-nopkcs11
Update cfssl to latest master.
2015-07-24 11:56:51 -07:00
Jacob Hoffman-Andrews 194658f019 Update cfssl to latest master.
This changes the default pkcs11 tag so pkcs11 is included by default.
This will let us remove -tags pkcs11 from our build scripts.
2015-07-24 10:54:16 -07:00
Roland Shoemaker 5b019f5ea8 Update miekg/dns dependency 2015-07-22 12:37:50 -07:00
Jacob Hoffman-Andrews dd19f0a529 Update cfssl to latest master.
Picks up fix for specifying User Notice policy qualifier.
Specify user notice in test configs.
2015-07-02 19:36:50 -07:00
Roland Shoemaker d462d0af43 Purge CAA parsing code, update miekg/dns dep 2015-06-19 18:53:00 +01:00
Jacob Hoffman-Andrews 05f04709e9 Update cfssl dependency to latest master
Also, remove dependency on cfssl CLI binary, and transitive dependency cf-tls.
These are no longer necessary now that we use the local signer. And the cf-tls
dependency had drifted out of date, causing build issues when I updated cfssl to
master.
2015-06-17 09:26:52 -07:00
Roland Shoemaker 0265b6f5d0 Merge upstream/master and fix conflicts 2015-06-10 12:43:11 -07:00
Jacob Hoffman-Andrews d80d301447 Update latest CFSSL to pick up OCSP config. 2015-06-03 16:51:23 -07:00
Richard Barnes c433da1a6f Properly updating this time 2015-05-30 12:09:06 -04:00
Roland Shoemaker b2f1dd82b6 vendor miekg/dns dependency 2015-05-27 20:49:58 +01:00
Jacob Hoffman-Andrews 3eed9e3f7c Move to Square's go-jose library. 2015-05-13 17:36:38 -07:00
Roland Shoemaker 8a6748182e add gorp dep 2015-05-02 16:00:35 -07:00
Jacob Hoffman-Andrews 757d8616cc Update latest CFSSL to pick up whitelisting. 2015-04-17 11:42:38 -04:00
Jacob Hoffman-Andrews e35f138fc1 Update Godeps. 2015-04-15 16:55:27 -04:00
Jacob Hoffman-Andrews 990aaeebba Merge remote-tracking branch 'le/master' into update-cfssl
Conflicts:
	Godeps/Godeps.json
2015-04-15 16:33:57 -04:00
Jacob Hoffman-Andrews 7c61a88cfa Update cfssl dependencies. 2015-04-13 14:18:29 -04:00
Roland Shoemaker ed4a147737 fix conflict 2015-04-12 21:55:01 -07:00
Roland Shoemaker 274e7efd3c switch client lib 2015-04-12 01:38:39 -07:00
Roland Shoemaker 1938e305e2 switch to statsd 2015-04-11 20:01:45 -07:00
Jacob Hoffman-Andrews 4bdec58e05 Include cfssl in vendored deps.
And introduce a start.sh that starts both boulder and cfssl.
2015-04-10 16:39:56 -07:00
Jacob Hoffman-Andrews 99bf61c0ac Add Godeps. 2015-03-26 14:20:34 -07:00