Commit Graph

110 Commits

Author SHA1 Message Date
Aaron Gable 11544756bb
Support new Google CT Policy (#6082)
Add a new code path to the ctpolicy package which enforces Chrome's new
CT Policy, which requires that SCTs come from logs run by two different
operators, rather than one Google and one non-Google log. To achieve
this, invert the "race" logic: rather than assuming we always have two
groups, and racing the logs within each group against each other, we now
race the various groups against each other, and pick just one arbitrary
log from each group to attempt submission to.

Ensure that the new code path does the right thing by adding a new zlint
which checks that the two SCTs embedded in a certificate come from logs
run by different operators. To support this lint, which needs to have a
canonical mapping from logs to their operators, import the Chrome CT Log
List JSON Schema and autogenerate Go structs from it so that we can
parse a real CT Log List. Also add flags to all services which run these
lints (the CA and cert-checker) to let them load a CT Log List from disk
and provide it to the lint.

Finally, since we now have the ability to load a CT Log List file
anyway, use this capability to simplify configuration of the RA. Rather
than listing all of the details for each log we're willing to submit to,
simply list the names (technically, Descriptions) of each log, and look
up the rest of the details from the log list file.

To support this change, SRE will need to deploy log list files (the real
Chrome log list for prod, and a custom log list for staging) and then
update the configuration of the RA, CA, and cert-checker. Once that
transition is complete, the deletion TODOs left behind by this change
will be able to be completed, removing the old RA configuration and old
ctpolicy race logic.

Part of #5938
2022-05-25 15:14:57 -07:00
Aaron Gable 9b4ca235dd
Update boulder-tools dependencies (#6129)
Update:
- golangci-lint from v1.42.1 to v1.46.2
- protoc from v3.15.6 to v3.20.1
- protoc-gen-go from v1.26.0 to v1.28.0
- protoc-gen-go-grpc from v1.1.0 to v1.2.0
- fpm from v1.14.0 to v1.14.2

Also remove a reference to go1.17.9 from one last place.

This does result in updating all of our generated .pb.go files, but only
to update the version number embedded in each file's header.

Fixes #6123
2022-05-20 14:24:01 -07:00
Aaron Gable f958d479f9
Stop testing on go1.17 (#6126)
We are using exclusively go1.18 in our deployment environments.
2022-05-18 08:40:29 -07:00
Jacob Hoffman-Andrews ca29b4b380
Install a specific version of fpm (#6049)
This prevents fpm from changing out from under us unexpectedly.
2022-04-13 16:26:09 -07:00
Samantha bafe45f301
Update Go to 1.17.9 and 1.18.1 (#6047)
go1.17.9 (released 2022-04-12) includes security fixes to the crypto/elliptic and encoding/pem packages, as well as bug fixes to the linker and runtime. See the [Go 1.17.9 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.17.9+label%3ACherryPickApproved) on our issue tracker for details.

go1.18.1 (released 2022-04-12) includes security fixes to the crypto/elliptic, crypto/x509, and encoding/pem packages, as well as bug fixes to the compiler, linker, runtime, the go command, vet, and the bytes, crypto/x509, and go/types packages. See the [Go 1.18.1 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.18.1+label%3ACherryPickApproved) on our issue tracker for details.
2022-04-12 19:32:42 -07:00
Jacob Hoffman-Andrews 7d00d9fbcf
Use go1.18 in CI, and fix up Docker image (#6002)
- Remove GOPATH-style path structure, which isn't needed with Go
modules.
- Remove check for existing of docker buildx builder instance, since it
was unreliable.
2022-03-21 12:24:13 -07:00
Jacob Hoffman-Andrews 6395701244
Update CI to test go1.18beta2 (#5982)
This requires using GODEBUG to enable a couple of thing turned off by go1.18 (TLS 1.0/1.1, SHA-1 CSRs).

Also add help for a failure mode of cross builds.
2022-03-09 13:42:15 -08:00
Andrew Gabbitas 3bb3421631
Remove go 1.17.5 from test matrix (#5940) 2022-02-12 12:03:23 -07:00
Andrew Gabbitas fcb817897c
Add go1.17.7 to the test matrix (#5939) 2022-02-10 17:50:46 -07:00
Aaron Gable ad0e56ec4a
Remove test coverage on go1.17 (#5882) 2022-01-14 16:22:24 -08:00
Samantha 7d4facc403
test: Install arm64 protobuf for arm64 docker images (#5880) 2022-01-13 13:45:38 -08:00
Samantha 8a1b51f81b
Use go install for dep binaries when building docker (#5858)
Update the way our docker build script installs the binaries we rely on
at runtime to avoid "go get" deprecation warnings.

Fixes #5744
2021-12-16 19:02:46 -08:00
Samantha c46003c52f
Fix error in the tag and upload script (#5857)
When looping over multiple Go versions this script currently exits in error
because we attempt to create a cross-compiling node even though it already
exists. This allows subsequent builds to make use of the Docker cache, reducing
the build time by ~400 seconds.

- Only create the cross-compiling node if it doesn't exist
- No longer remove the cross-compiling node on exit
2021-12-16 19:00:47 -08:00
Aaron Gable c88640c816
Run tests on Go 1.17.5 (#5845)
Build a new docker container for the new Go 1.17.5 security release,
which includes a fix for the `net/http` package. Update our CI to run
tests on both our current and the new go versions.
2021-12-10 14:44:23 -08:00
Samantha 23cf26f392
test: Delete docker buildx node unconditionally (#5847)
Currently, if `docker buildx` fails the cross-compilation node, created before
the build starts, will never be deleted. This ensures that the cross-compilation
node is always deleted before `tag_and_upload.sh` exits.
2021-12-10 13:12:08 -08:00
Samantha 65ed9c7974
test: Add support for multi-arch docker images (#5837) 2021-12-08 10:51:01 -08:00
Aaron Gable eb5d0e9ba9
Update golangci-lint from v1.29.0 to v1.42.1 (#5745)
Update the version of golangci-lint we use in our docker image,
and update the version of the docker image we use in our tests.
Fix a couple places where we were violating lints (ineffective assign
and calling `t.Fatal` from outside the main test goroutine), and add
one lint (using math/rand) to the ignore list.

Fixes #5710
2021-10-22 16:26:59 -07:00
Samantha 18e5f405ed
Add script to perform weppos/publicsuffix-go upgrades (#5661)
Part Of #5650
2021-10-13 18:45:08 -07:00
Andrew Gabbitas 258e0cf7c1
Remove go 1.16.6 from testing (#5636)
Fixes: #5585
2021-09-07 15:34:54 -06:00
Andrew Gabbitas 9fd55b6e39
Update Boulder CI to golang 1.17 (#5608)
Part of #5585
2021-08-26 14:34:36 -07:00
Aaron Gable 9a7dd0bb33
Update from go1.17beta1 to go1.17rc1 (#5537) 2021-07-13 15:57:35 -07:00
Aaron Gable 4c581436a3
Add go1.17beta1 to CI (#5483)
Add go1.17beta1 docker images to the set of things we build,
and integrate go1.17beta1 into the set of environments CI runs.
Fix one test which breaks due to an underlying refactoring in
the `crypto/x509` stdlib package. Fix one other test which breaks
due to new guarantees in the stdlib's TLS ALPN implementation.

Also removes go1.16.5 from CI so we're only running 2 versions.

Fixes #5480
2021-07-13 10:00:04 -07:00
Andrew Gabbitas fc9ac77a69
Add testing for go1.16.6 (#5524) 2021-07-12 23:41:06 -06:00
Aaron Gable 923aef5839
Update to go1.16.5 (#5482)
Includes a number of updates to packages we use: math/big,
net, net/http/httputil, and archive/zip. See release notes at
https://golang.org/doc/devel/release#go1.16.minor

Fixes #5464
2021-06-15 11:42:04 -07:00
Andrew Gabbitas 401df1c48a
Remove go1.16.2 from ci matrix (#5417)
Fixes #5416
2021-05-14 11:04:25 -07:00
Aaron Gable 81bb7dd571
Add Go 1.16.4 to docker image and CI (#5407)
This minor release contains a security fix for the http package's
Client, Server, and Transport, all of which we use.

CVE-2021-31525
2021-05-06 13:33:07 -07:00
Jacob Hoffman-Andrews 7194624191
Update grpc and protobuf to latest. (#5369)
protoc now generates grpc code in a separate file from protobuf code.
Also, grpc servers are now required to embed an "unimplemented"
interface from the generated .pb.go file, which provides forward
compatibility.

Update the generate.go files since the invocation for protoc has changed
with the split into .pb.org and _grpc.pb.go.

Fixes #5368
2021-04-01 17:18:15 -07:00
Jacob Hoffman-Andrews b5471f36f0
Switch to OS-provided SoftHSM2. (#5365)
The OS-provided packages used to be too old for us, but now they are
not!
2021-03-30 17:37:58 -07:00
Samantha 1e5d89e6c8
Remove Coveralls (#5363)
- Remove `goveralls`, `gover`, and `cover` from `build.sh`.
- Remove `--coverage` option from `test.sh`.
- Update Docker image in `docker-compose.yml` and
  `.github/workflows/boulder-ci.yml`

Fixes #5357
2021-03-29 11:56:52 -07:00
Samantha cdce9f0f2f
Remove Travis-CI (#5356)
- Remove `.travis.yml`
- Remove references to Travis in `test.sh`
- Update documentation in `test/boulder-tools/README.md`, `README.MD`,
  and `CONTRIBUTING.MD`
- Update comments in `.github/workflows/boulder-ci.yml`

Fixes #5329
2021-03-19 17:49:05 -07:00
Andrew Gabbitas 8315393eb1
Update tests to go1.16.2 (#5342)
* Update to go1.16.2

Fixes #5333
2021-03-16 14:56:20 -06:00
Aaron Gable 34d2de4f7e
Remove additional mocking infrastructure (#5332)
Remove mock-vendor, which ensured that mockgen was
available, because we no longer use mockgen. As a result,
remove mockgen from our docker build script. Finally, make
the mock package an indirect dependency since we are no
longer using it directly.
2021-03-11 15:28:51 -08:00
Andrew Gabbitas ceffe18dfc
Add testing for golang 1.16 (#5313)
- Add 1.16.1 to the GitHub CI test matrix
- Fix tlsalpn tests for go 1.16.1 but maintain compatibility with 1.15.x
- Fix integration tests.

Fix: #5301
Fix: #5316
2021-03-11 11:47:41 -08:00
Andrew Gabbitas 066ed3427e
Add GitHub actions workflow for Boulder CI tests (#5308)
- Add GitHub actions workflow for Boulder CI tests in parity with Travis
  CI except the coverage test.
- Change boulder-tools docker image to push to a static docker repo
  instead of creating a new one each time. Use docker version tags and git
  hash to identify go versions in the repo.
- Change docker-compose to pull from the static boulder-tools repo. This
  breaks using the TRAVIS_GO_VERSION env variable to pull the docker image, but
  the default will still work with intent of decommissioning Travis-CI for
  GitHub CI.

Fix: #5289
2021-02-26 12:59:47 -08:00
Samantha 7cbfe94f30
Switch docker base image from buster-scm to focal-scm (#5287)
- Switch docker base image from`buster-scm` to `focal-scm`
- Add `dockerfile` lines to correct `/etc/rsyslog.conf` settings

Fixes #5295
2021-02-22 10:33:50 -08:00
Aaron Gable c7c666475c
Stop running tests on go1.15.5 (#5256)
The go 1.15.7 security release is running everywhere, so we no
longer need to run tests on this older version.

Fixes #5237
2021-01-27 13:30:00 -08:00
Andrew Gabbitas e8a6eabbd5
Update to go1.15.7 (#5241)
Go version 1.15.7 is a security release.

Fixes: #5237
2021-01-20 11:38:38 -08:00
Samantha e8ca1987cd
Python upgrade os upgrades and travis config cleanup (#5186)
Modified the Dockerfile to build using Debian Buster, an upgrade from
Debian Stretch. The default Python 3 version for Stretch is 3.5.x which
is soon to de deprecated by Python-cryptography a dependency we rely on
for our integration test suite. The default Python 3 version for Debian
Buster is 3.7.x

In the .travis.yml file we are instructing travis to provision Xenial
instances and install two versions of Go. This change bumps Xenial
(16.04) -> Focal (20.04) and removes the installation of the two Go
versions; all of our testing happens inside of a docker container so
having Go installed on the Docker parent isn't necessary.

In the docker-compose.yml file we configure which docker image to pull
from Dockerhub, I've updated these to reflect the Debian Buster images
already built and pushed.

Modified build.sh to install mariadb-client-core 10.3, there is no 10.1
install candidate for Debian Buster and release notes for 10.2 and 10.3
indicate that these were both security releases.

Modified test.sh to use python3 instead of system python (usually 2.7)
for test/grafana/lints.py

Fixes #5180
2020-11-23 18:12:04 -08:00
Aaron Gable ad89e0b658
Update to go1.15.5 (#5179)
Go version 1.15.5 is a security release which introduces fixes
both to the big.Int package (which we use) and the go compiler
itself (which we use).

Release notes: https://golang.org/doc/go1.15

This change builds go1.15.5 versions of our docker containers,
adds tests on the new version to our travis config, and sets the
default to be the new version.

Fixes #5173
2020-11-12 13:31:23 -08:00
Aaron Gable d1d9269530
Switch to testing only on go1.15 (#5022)
Now that our prod deployment has updated to using go1.15,
it is no longer be necessary to duplicate our tests across two
different go versions.
2020-08-24 13:47:50 -07:00
Aaron Gable 316ffd6241
Update to stable go1.15 (#5021)
This updates our test infrastructure from using go1.15rc2 to the
newly-released go1.15 stable version.
2020-08-17 12:32:20 -07:00
Aaron Gable d873e01fa8
Update to go1.15rc2 for tests (#5013)
Go 1.15rc2 was released today. The diff from rc1 only includes one
change to the crypto/ package, but worth upgrading just to be ready
for the official 1.15 stable release.
2020-08-10 11:24:32 -07:00
Roland Bracewell Shoemaker 75b034637b
Update travis go versions (remove 1.14.1, add 1.15rc1) (#5002)
Fixes #4919.
2020-08-04 12:13:09 -07:00
Aaron Gable 09917baf47
Add gosec linter to golangci-lint (#4990)
This enables the gosec linter. It also disables a number of
warnings which it emits on the current codebase. Some of these
(e.g. G104: Errors unhandled) we expect to leave disabled
permanently; others (e.g. G601: Implicit memory aliasing in for loop)
we expect to fix and then enable to prevent regressions.

Part of #4948
2020-07-28 16:42:17 -07:00
Aaron Gable 696fc4e122
Enable testing on go1.14.5 (#4953)
New go version 1.14.5 was released today:
https://groups.google.com/g/golang-announce/c/XZNfaiwgt2w/m/E6gHDs32AQAJ
It includes a security fix for X.509 verification
(CVE-2020-14039, https://golang.org/issue/39360).
2020-07-14 11:28:39 -07:00
Roland Bracewell Shoemaker 7673f02803
Use cmd/ceremony in integration tests (#4832)
This ended up taking a lot more work than I expected. In order to make the implementation more robust a bunch of stuff we previously relied on has been ripped out in order to reduce unnecessary complexity (I think I insisted on a bunch of this in the first place, so glad I can kill it now).

In particular this change:

* Removes bhsm and pkcs11-proxy: softhsm and pkcs11-proxy don't play well together, and any softhsm manipulation would need to happen on bhsm, then require a restart of pkcs11-proxy to pull in the on-disk changes. This makes manipulating softhsm from the boulder container extremely difficult, and because of the need to initialize new on each run (described below) we need direct access to the softhsm2 tools since pkcs11-tool cannot do slot initialization operations over the wire. I originally argued for bhsm as a way to mimic a network attached HSM, mainly so that we could do network level fault testing. In reality we've never actually done this, and the extra complexity is not really realistic for a handful of reasons. It seems better to just rip it out and operate directly on a local softhsm instance (the other option would be to use pkcs11-proxy locally, but this still would require manually restarting the proxy whenever softhsm2-util was used, and wouldn't really offer any realistic benefit).
* Initializes the softhsm slots on each integration test run, rather than when creating the docker image (this is necessary to prevent churn in test/cert-ceremonies/generate.go, which would need to be updated to reflect the new slot IDs each time a new boulder-tools image was created since slot IDs are randomly generated)
* Installs softhsm from source so that we can use a more up to date version (2.5.0 vs. 2.2.0 which is in the debian repo)
* Generates the root and intermediate private keys in softhsm and writes out the root and intermediate public keys to /tmp for use in integration tests (the existing test-{ca,root} certs are kept in test/ because they are used in a whole bunch of unit tests. At some point these should probably be renamed/moved to be more representative of what they are used for, but that is left for a follow-up in order to keep the churn in this PR as related to the ceremony work as possible)
Another follow-up item here is that we should really be zeroing out the database at the start of each integration test run, since certain things like certificates and ocsp responses will be signed by a key/issuer that is no longer is use/doesn't match the current key/issuer.

Fixes #4832.
2020-06-03 15:20:23 -07:00
Jacob Hoffman-Andrews b1347fb3b3
Upgrade to latest protoc and protoc-gen-go (#4794)
There are some changes to the code generated in the latest version, so
this modifies every .pb.go file.

Also, the way protoc-gen-go decides where to put files has changed, so
each generate.go gets the --go_opt=paths=source_relative flag to
tell protoc to continue placing output next to the input.

Remove staticcheck from build.sh; we get it via golangci-lint now.

Pass --no-document to gem install fpm; this is recommended in the fpm docs.
2020-04-23 18:54:44 -07:00
Jacob Hoffman-Andrews 0b3223494c
Clean up tag_and_upload.sh. (#4791)
We used a template and sed in #3622 because common versions of Docker
didn't support build args. But now they do, so we can use the convenient
build args feature to parameterize which Go version to use.

Also, remove the --no-cache flag to docker build, which slows things
down unnecessarily.
2020-04-23 11:52:29 -07:00
Jacob Hoffman-Andrews 87fb6028c1
Add log validator to integration tests (#4782)
For now this mainly provides an example config and confirms that
log-validator can start up and shut down cleanly, as well as provide a
stat indicating how many log lines it has handled.

This introduces a syslog config to the boulder-tools image that will write
logs to /var/log/program.log. It also tweaks the various .json config
files so they have non-default syslogLevel, to ensure they actually
write something for log-validator to verify.
2020-04-20 13:33:42 -07:00
Jacob Hoffman-Andrews 908e8b5590
Test with Go 1.14.1 only. (#4785)
Now that we've deployed Go 1.14.1 in prod, we can remove 1.13.2 from our
test matrix.
2020-04-16 16:57:05 -07:00