Commit Graph

218 Commits

Author SHA1 Message Date
Eng Zer Jun 13db2a252f
refactor: remove usages of experimental maps package (#7849)
All 4 usages of the `maps.Keys` function from the
`golang.org/x/exp/maps` package can be refactored to a simpler
alternative. If we need it in the future, it is available in the
standard library since Go 1.23.
2024-12-06 11:50:32 -08:00
Samantha Frank f9fb688427
build: Specify go 1.23.0 in go.mod (#7822)
We're using `.Keys()` a method of the maps package added in 1.23
(https://pkg.go.dev/maps@master#Keys) but our go.mod states 1.22.0. This
causes some in-IDE linting errors in VSCode.
2024-11-15 12:49:04 -08:00
dependabot[bot] 844334e04a
build(deps): bump the aws group across 1 directory with 4 updates (#7757)
Bumps the aws group with 3 updates in the / directory:
[github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2),
[github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2)
and
[github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2).

Updates `github.com/aws/aws-sdk-go-v2` from 1.31.0 to 1.32.2
Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.39 to 1.27.43
Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.63.3 to 1.65.3
Updates `github.com/aws/smithy-go` from 1.21.0 to 1.22.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-21 17:15:48 -04:00
dependabot[bot] 0a543d151b
build(deps): bump the aws group across 1 directory with 4 updates (#7734) 2024-10-07 13:39:28 -07:00
dependabot[bot] 61ff7f606d
Update OTel dependencies (#7713)
Updates:
- go.opentelemetry.io/contrib/instrumentation (and subpackages) from 0.52.0 to 0.55.0
- go.opentelemetry.io/otel (and subpackages) from 1.27.0 to 1.30.0

Upstream release notes:
https://github.com/open-telemetry/opentelemetry-go-contrib/releases

Also transitively updates a few golang.org/x/ dependencies, and the grpc and protobuf
dependencies.
2024-10-07 13:22:08 -07:00
Adin Schmahmann 9b08fa52ca
Update public suffix list (#7672)
Updates:

github.com/weppos/publicsuffix-go from
v0.30.3-0.20240510084413-5f1d03393b3d to
v0.40.3-0.20240815124645-a8ed110559c9
golang.org/x/crypto from v0.24.0 to v0.26.0
golang.org/x/net from v0.26.0 to v0.28.0
golang.org/x/sync from v0.7.0 to v0.8.0
golang.org/x/term from v0.21.0 to v0.23.0
golang.org/x/text from v0.16.0 to v0.17.0
golang.org/x/sys from v0.21.0 to v0.23.0
2024-08-19 14:03:03 -04:00
Matthew McPherrin 80351a94e9
Add opentelemetry tracing for Redis (#7598)
This pulls in the redisotel "extra" from the go-redis driver and
instruments our Redis connections with it.
2024-08-08 11:12:58 -04:00
dependabot[bot] b9eff346fc
build(deps): bump the aws group across 1 directory with 3 updates (#7625)
Updates `github.com/aws/aws-sdk-go-v2` from 1.30.1 to 1.30.3
Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.24 to 1.27.27
Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.58.0 to 1.58.2

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 12:05:13 -04:00
Phil Porada f2e46486f9
Upgrade miekg/dns from v1.1.58 to v1.1.61 (#7592)
Diff: [here](https://github.com/miekg/dns/compare/v1.1.58..v1.1.61).
2024-07-16 11:56:16 -04:00
Phil Porada b61c7e1fdd
Upgrade go-redis from v9.3.0 to v9.4.0 (#7593)
Skip v9.3.1 and go straight to v9.4.0 because it's a fix for a
breaking change introduced in v9.3.1. I don't believe we can upgrade to
v9.5.x at this time because of our [redis container
version](fa3b0106e5/docker-compose.yml (L110-L111)).

Changes from
[v9.3.1](https://github.com/redis/go-redis/releases/tag/v9.3.1)
Changes from
[v9.4.0](https://github.com/redis/go-redis/releases/tag/v9.4.0)
2024-07-16 11:55:33 -04:00
Phil Porada 472effbb9b
grpc: Switch to go-grpc-middleware/providers/prometheus (#7588)
While investigating #6384, I noticed that
[go-grpc-prometheus](https://github.com/grpc-ecosystem/go-grpc-prometheus?tab=readme-ov-file)
was deprecated last year and users should switch to
[go-grpc-middleware](https://github.com/grpc-ecosystem/go-grpc-middleware)
instead. The default prometheus histogram buckets will continue to be
used and [can be found
here](6e3f4b1091/prometheus/histogram.go (L261-L265)).
2024-07-12 15:02:37 -04:00
Phil Porada f79c344dcd
Update eggsampler/acme to v3.6.1 (#7589)
This change has negligible benefits, but
[v3.6.1](https://github.com/eggsampler/acme/releases/tag/v3.6.1) does
contain my ARI support for Pebble which I think is pretty rad.
2024-07-12 10:38:49 -04:00
dependabot[bot] 74eba3bc08
build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.27.23 to 1.27.24 in the aws group (#7583)
Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.23 to 1.27.24

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 10:54:26 -04:00
Samantha Frank 6e2a07d58d
dependencies: Update grpc-go from v1.64 to v1.64.1 (#7578) 2024-07-09 16:56:48 -04:00
dependabot[bot] 9c88e49fb1
build(deps): bump the aws group with 4 updates (#7570)
Updates `github.com/aws/aws-sdk-go-v2` from 1.30.0 to 1.30.1
Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.21 to 1.27.23
Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.56.1 to 1.58.0
Updates `github.com/aws/smithy-go` from 1.20.2 to 1.20.3

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samantha Frank <hello@entropy.cat>
2024-07-08 10:33:48 -04:00
dependabot[bot] 7d3c8af2c9
build(deps): bump the aws group with 3 updates (#7563)
Bumps the aws group with 3 updates:
[github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2),
[github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2)
and
[github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2).

Updates `github.com/aws/aws-sdk-go-v2` from 1.29.0 to 1.30.0
Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.20 to 1.27.21
Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.56.0 to 1.56.1

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 11:46:08 -04:00
Jacob Hoffman-Andrews c0ffbac7a8
sa: truncate times in type converter (#7556)
We believe the MariaDB query planner generates inefficient query plans
when a time index is queried using high precision (nanosecond) times.
This uses the updated borp from[1] to automatically truncate
`time.Time` and `*time.Time` in query parameters.

[1]: https://github.com/letsencrypt/borp/pull/11

Part of #5437
2024-06-24 11:26:34 -07:00
dependabot[bot] 805ae53452
build(deps): bump the aws group with 3 updates (#7553)
Bumps the aws group with 3 updates:
[github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2),
[github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2)
and
[github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 11:01:47 -04:00
dependabot[bot] daa5aefb43
Bump the aws group with 4 updates (#7552)
- Updates `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.27.2
- Updates `github.com/aws/aws-sdk-go-v2/config` from 1.26.3 to 1.27.18
- Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.55.1
- Updates `github.com/aws/smithy-go` from 1.20.0 to 1.20.2

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 17:05:32 -04:00
dependabot[bot] 6b4577ecc4
update otel dependencies to v1.27.0 and v0.52.0 (#7496)
Directly update:
- go.opentelemetry.io/otel/* from v1.26.0 to v1.27.0
- go.opentelemetry.io/contrib/* from v0.51.0 to v0.52.0

Indirectly update:
- google.golang.org/protobuf from v1.33.0 to v1.34.0

This update breaks some of our existing otel grpc interceptors, but in
return allows us to use the newer grpc StatsHandler mechanism, while
still filtering out health-check requests.

Fixes https://github.com/letsencrypt/boulder/issues/7235
2024-05-29 15:46:35 -07:00
Aaron Gable 89213f9214
Use generic types for gRPC stream implementations (#7501)
Update the version of protoc-gen-go-grpc that we use to generate Go gRPC
code from our proto files, and update the versions of other gRPC tools
and libraries that we use to match. Turn on the new
`use_generic_streams` code generation flag to change how
protoc-gen-go-grpc generates implementations of our streaming methods,
from creating a wholly independent implementation for every stream to
using shared generic implementations.

Take advantage of this code-sharing to remove our SA "wrapper" methods,
now that they have truly the same signature as the SARO methods which
they wrap. Also remove all references to the old-style stream names
(e.g. foopb.FooService_BarMethodClient) and replace them with the new
underlying generic names, for the sake of consistency. Finally, also
remove a few custom stream test mocks, replacing them with the generic
mocks.ServerStreamClient.

Note that this PR does not change the names in //mocks/sa.go, to avoid
conflicts with work happening in the pursuit of
https://github.com/letsencrypt/boulder/issues/7476. Note also that this
PR updates the version of protoc-gen-go-grpc that we use to a specific
commit. This is because, although a new release of grpc-go itself has
been cut, the codegen binary is a separate Go module with its own
releases, and it hasn't had a new release cut yet. Tracking for that is
in https://github.com/grpc/grpc-go/issues/7030.
2024-05-24 13:54:25 -07:00
dependabot[bot] 1053352d1f
build(deps): bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.46.1 to 0.51.0 (#7467)
Bumps
[go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib)
from 0.46.1 to 0.51.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Gable <aaron@letsencrypt.org>
2024-05-20 12:14:27 -04:00
Aaron Gable 6ee675f2f0
Update public suffix list (#7484)
It's been one month since the last PSL update.

Update:
- github.com/weppos/publicsuffix-go from
v0.30.3-0.20240411085455-21202160c2ed to
v0.30.3-0.20240510084413-5f1d03393b3d
- golang.org/x/crypto from v0.22.0 to v0.23.0 (no changes)
- golang.org/x/net from v0.24.0 to v0.25.0
- golang.org/x/term from v0.19.0 to v0.20.0 (no changes)
- golang.org/x/text from v0.14.0 to v0.15.0 (no changes)
- golang.org/x/sys from v0.19.0 to v0.20.0

Fixes https://github.com/letsencrypt/boulder/issues/7483
2024-05-14 10:10:20 -04:00
Phil Porada 42b2240481
test: Update eggsampler/acme to support draft-ietf-acme-ari-03 (#7470)
`Eggsampler/acme` v3.6.0 has been
[released](https://github.com/eggsampler/acme/releases/tag/v3.6.0). I've
updated the ARI integration tests to issue replacement orders.

Fixes https://github.com/letsencrypt/boulder/issues/7463

---------

Co-authored-by: Aaron Gable <aaron@letsencrypt.org>
2024-05-08 11:01:27 -04:00
Aaron Gable e05d47a10a
Replace explicit int loops with range-over-int (#7434)
This adopts modern Go syntax to reduce the chance of off-by-one errors
and remove unnecessary loop variable declarations.

Fixes https://github.com/letsencrypt/boulder/issues/7227
2024-04-22 10:34:51 -07:00
Aaron Gable 2b8dea9821
Update publicsuffix-go (#7429)
We last updated the PSL two months ago, and the latest officially-tagged
release of publicsuffic-go is just one month old, but the domain
prompting the latest request to update the PSL landed just a few days
ago, so update to the latest commit rather than the latest release.

Also incidentally updates x/crypto, x/net, x/term, and x/sys, but brings
in no meaningful updates for any of them.

Fixes https://github.com/letsencrypt/boulder/issues/7428
2024-04-15 11:37:11 -07:00
dependabot[bot] 393beac0a1
build(deps): bump golang.org/x/sync from 0.6.0 to 0.7.0 (#7426)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.6.0 to
0.7.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-12 12:30:55 -04:00
Aaron Gable 7086537553
Update golang.org/x/net for security advisory (#7413)
This will fix the error govulncheck is reporting.
2024-04-04 12:50:42 -04:00
Phil Porada 5f616ccdb9
Upgrade go-jose from v2.6.1 to v.4.0.1 (#7345)
Upgrade from the old go-jose v2.6.1 to the newly minted go-jose v4.0.1. 
Cleans up old code now that `jose.ParseSigned` can take a list of
supported signature algorithms.

Fixes https://github.com/letsencrypt/boulder/issues/7390

---------

Co-authored-by: Aaron Gable <aaron@letsencrypt.org>
2024-04-02 17:49:51 -04:00
dependabot[bot] f0ade6b2cb
build(deps): bump github.com/eggsampler/acme/v3 from 3.4.0 to 3.5.0 (#7391) 2024-03-20 15:21:16 -07:00
dependabot[bot] 206c35f099
build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#7384)
Updates google.golang.org/protobuf from 1.32.0 to 1.33.0
Also updates github.com/golang/protobuf from 1.5.3 to 1.5.4
2024-03-19 10:39:33 -07:00
dependabot[bot] c175272335
build(deps): bump go.opentelemetry.io/otel/trace from 1.21.0 to 1.24.0 (#7343)
Bumps
[go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go)
from 1.21.0 to 1.24.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 13:36:52 -04:00
dependabot[bot] 34b705f293
build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.48.0 to 1.50.2 (#7333)
Bumps
[github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2)
from 1.48.0 to 1.50.2.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 10:31:30 -05:00
Matthew McPherrin 96f1240603
Update publicsuffix-go (#7334) 2024-02-21 17:51:26 -05:00
Aaron Gable 10e894a172
Create new admin tool (#7276)
Create a new administration tool "bin/admin" as a successor to and
replacement of "admin-revoker".

This new tool supports all the same fundamental capabilities as the old
admin-revoker, including:
- Revoking by serial, by batch of serials, by incident table, and by
private key
- Blocking a key to let bad-key-revoker take care of revocation
- Clearing email addresses from all accounts that use them

Improvements over the old admin-revoker include:
- All commands run in "dry-run" mode by default, to prevent accidental
executions
- All revocation mechanisms allow setting the revocation reason,
skipping blocking the key, indicating that the certificate is malformed,
and controlling the number of parallel workers conducting revocation
- All revocation mechanisms do not parse the cert in question, leaving
that to the RA
- Autogenerated usage information for all subcommands
- A much more modular structure to simplify adding more capabilities in
the future
- Significantly simplified tests with smaller mocks

The new tool has analogues of all of admin-revokers unit tests, and all
integration tests have been updated to use the new tool instead. A
future PR will remove admin-revoker, once we're sure SRE has had time to
update all of their playbooks.

Fixes https://github.com/letsencrypt/boulder/issues/7135
Fixes https://github.com/letsencrypt/boulder/issues/7269
Fixes https://github.com/letsencrypt/boulder/issues/7268
Fixes https://github.com/letsencrypt/boulder/issues/6927
Part of https://github.com/letsencrypt/boulder/issues/6840
2024-02-07 09:35:18 -08:00
dependabot[bot] 7fa2237417
build(deps): bump github.com/miekg/dns from 1.1.55 to 1.1.58 (#7279)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.55
to 1.1.58.
2024-02-02 13:28:05 -05:00
Matthew McPherrin 56c10c613c
Update zlint (#7252)
Upgrade to zlint v3.6.0

Two new lints are triggered in various places:
aia_contains_internal_names is ignored in integration test
configurations, and unit tests are updated to have more realistic URLs.
The w_subject_common_name_included lint needs to be ignored where we'd
ignored n_subject_common_name_included before.

Related to https://github.com/letsencrypt/boulder/issues/7261
2024-01-16 11:50:37 -08:00
dependabot[bot] c47e95e75a
build(deps): bump github.com/aws/aws-sdk-go-v2
Update AWS SDK v2, and its dependencies and subpackages:

- ask-sdk-go-v2: v1.22.1 -> v1.24.1
- aws-sdk-go-v2/config: v1.18.25 -> v1.26.3
- aws-sdk-go-v2/config: v1.18.25 -> v1.48.0
- smithy-go: v1.16.0 -> v1.19.0
2024-01-08 13:27:17 -08:00
Matthew McPherrin e8d382aec0
Upgrade the protobuf and grpc dependencies in Boulder (#7232)
Protobuf v1.32 fixes a potential stack overflow crash. Boulder doesn't
expose grpc externally so the risk is minimal, but it seems prudent to
upgrade on a regular cadence.  IE, this is not a security fix for Boulder.
2024-01-08 11:23:23 -08:00
dependabot[bot] 21fc191273
build(deps): bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.44.0 to 0.46.1 (#7233)
Bumps
[go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib)
from 0.44.0 to 0.46.1.
2024-01-02 12:44:53 -05:00
dependabot[bot] 238518da55
build(deps): bump golang.org/x/crypto from 0.15.0 to 0.17.0 (#7223)
Changelog: https://github.com/golang/crypto/compare/v0.15.0...v0.17.0
2023-12-20 11:38:15 -08:00
dependabot[bot] 289284ad6e
build(deps): bump golang.org/x/term from 0.13.0 to 0.15.0 (#7210)
Updates golang.org/x/term and golang.org/x/sys. Changelogs:
- https://github.com/golang/term/compare/v0.13.0...v0.15.0
- https://github.com/golang/sys/compare/v0.13.0...v0.15.0
2023-12-13 16:23:01 -08:00
Aaron Gable eda6e4cb4a
Update OTel dependencies to latest (#7206)
This resolves https://github.com/advisories/GHSA-8pgv-569h-w5rw and
https://github.com/advisories/GHSA-rcjv-mgp8-qvmr, both DoS attacks via
metric cardinality explosion in the default OTel http and gRPC
middleware.
2023-12-13 09:33:39 -05:00
dependabot[bot] deccb0346d
build(deps): bump github.com/redis/go-redis/v9 from 9.2.1 to 9.3.0 (#7186)
Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis)
from 9.2.1 to 9.3.0.
2023-12-12 10:09:12 -05:00
dependabot[bot] 03b0258b53
build(deps): bump golang.org/x/text from 0.13.0 to 0.14.0 (#7160)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.13.0 to
0.14.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 15:58:15 -05:00
dependabot[bot] de58ad1318
build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.40.0 to 1.42.0 (#7145)
Bumps
[github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2)
from 1.40.0 to 1.42.0.
2023-11-14 16:35:02 -05:00
Matthew McPherrin 75439eab4b
Replace hpcloud/tail with nxadm/tail (#7152)
The hpcloud version appears abandoned, with numerous unfixed bugs
including ones that can cause it to miss data.  The nxadm fork is
maintained.

The updated tail also pulls in an updated fsnotify. We had it vendored
at two paths before, so this has a side benefit of simplifying us to
having just one copy.
2023-11-09 16:30:15 -08:00
Aaron Gable 617b6edea4
Update google.golang.org/grpc to v1.59.0 (#7130)
This version contains mitigations for the HTTP/2 rapid-reset DoS vector.
See https://github.com/advisories/GHSA-m425-mq94-257g for details.

Changelog: https://github.com/grpc/grpc-go/compare/v1.54.0...v1.59.0
2023-11-02 10:20:14 -04:00
dependabot[bot] 50ec4786e4
build(deps): bump github.com/redis/go-redis/v9 from 9.1.0 to 9.2.1 (#7107)
Bumps https://github.com/redis/go-redis from 9.1.0 to 9.2.1.
- Release notes: https://github.com/redis/go-redis/releases/tag/v9.2.1
- Changelog: https://github.com/redis/go-redis/compare/v9.1.0...v9.2.1
2023-10-27 09:12:54 -07:00
dependabot[bot] 1aa304063d
build(deps): bump golang.org/x/net from 0.11.0 to 0.17.0 (#7113)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.17.0.
2023-10-19 11:52:58 -04:00