Commit Graph

129 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews eda496606d
crl-updater: split temporal/explicit sharding by serial (#7990)
When we turn on explicit sharding, we'll change the CA serial prefix, so
we can know that all issuance from the new prefixes uses explicit
sharding, and all issuance from the old prefixes uses temporal sharding.
This lets us avoid putting a revoked cert in two different CRL shards
(the temporal one and the explicit one).

To achieve this, the crl-updater gets a list of temporally sharded
serial prefixes. When it queries the `certificateStatus` table by date
(`GetRevokedCerts`), it will filter out explicitly sharded certificates:
those that don't have their prefix on the list.

Part of #7094
2025-02-04 11:45:46 -05:00
Jacob Hoffman-Andrews 5cc29be589
doc: add documentation for CRL generation (#7980)
Part of #7094
2025-01-27 15:52:55 -08:00
Shiloh Heurich 2d1f277635
Fix typos in documentation and error messages (#7975)
- Fix 'requesteed' -> 'requested' in errors/errors.go
- Fix 'paylod' -> 'payload' in docs/acme-divergences.md

These changes address typos identified by the linter.
2025-01-24 08:10:06 -08:00
Jacob Hoffman-Andrews efaa370457
doc: boulder now has Retry-After on all ratelimits (#7876)
Thanks to MikeMcQ from the forum for
[noticing](https://community.letsencrypt.org/t/new-rate-limit-page-in-conflict-with-boulder-variances/229849).
2024-12-12 16:27:58 -05:00
Jacob Hoffman-Andrews 8c45a4fb04
docs: update CONTRIBUTING.md (#7857)
Describe what to do if a bot comments on your PR, and update our
description of feature flags and their deprecation.
2024-12-04 18:26:08 -08:00
Jacob Hoffman-Andrews a46c388f66
va: compute maxRemoteFailures based on MPIC (#7810)
Previously this was a configuration field.

Ports `maxAllowedFailures()` from `determineMaxAllowedFailures()` in
#7794.

Test updates:
 
Remove the `maxRemoteFailures` param from `setup` in all VA tests.

Some tests were depending on setting this param directly to provoke
failures.

For example, `TestMultiVAEarlyReturn` previously relied on "zero allowed
failures". Since the number of allowed failures is now 1 for the number
of remote VAs we were testing (2), the VA wasn't returning early with an
error; it was succeeding! To fix that, make sure there are two failures.
Since two failures from two RVAs wouldn't exercise the right situation,
add a third RVA, so we get two failures from three RVAs.

Similarly, TestMultiCAARechecking had several test cases that omitted
this field, effectively setting it to zero allowed failures. I updated
the "1 RVA failure" test case to expect overall success and added a "2
RVA failures" test case to expect overall failure (we previously
expected overall failure from a single RVA failing).

In TestMultiVA I had to change a test for `len(lines) != 1` to
`len(lines) == 0`, because with more backends we were now logging more
errors, and finding e.g. `len(lines)` to be 2.
2024-11-18 15:36:09 -08:00
Jacob Hoffman-Andrews 3baea4356f
Revert "sa: truncate all timestamps to seconds (#7519)" (#7559)
This reverts commit 2b5b6239a4.

Following up on #7556, after we made a more systematic change to use
borp's TypeConverter, we no longer need to manually truncate timestamps.
2024-06-26 17:25:05 -07:00
Jacob Hoffman-Andrews 2b5b6239a4
sa: truncate all timestamps to seconds (#7519)
As described in #7075, go-sql-driver/mysql v1.5.0 truncates timestamps
to microseconds, while v1.6.0 and above does not. That means upon
upgrading to v1.6.0, timestamps are written to the database with a
resolution of nanoseconds, and SELECT statements also use a resolution
of nanoseconds. We believe this is the cause of performance problems
we observed when upgrading to v1.6.0 and above.

To fix that, apply rounding in the application code. Rather than
just rounding to microseconds, round to seconds since that is the
resolution we care about.  Using seconds rather than microseconds
may also allow some of our indexes to grow more slowly over time.

Note: this omits truncating some timestamps in CRL shard calculations,
since truncating those resulted in test failures that I'll follow up
on separately.
2024-06-12 15:00:24 -07:00
Aaron Gable c3c278a1a2
Deprecate EnforceMultiVA and MultiVAFullResults feature flags (#7520)
These flags have been true and false, respectively, for years. We do not
expect to change them at any time in the future, and their continued
existence makes certain parts of the VA code significantly more complex.

Remove all references to them, preserving behavior in the "enforce, but
not full results" configuration.

IN-10358 tracks the corresponding config changes
2024-06-04 11:57:03 -07:00
Aaron Gable 146b78a0f7
Remove all static minica keys (#7489)
Remove the redis-tls, wfe-tls, and mail-test-srv keys which were
generated by minica and then checked in to the repo. All three are
replaced by the dynamically-generated ipki directory.

Part of https://github.com/letsencrypt/boulder/issues/7476
2024-05-17 11:45:40 -07:00
Phil Porada 44c0587988
remoteva: Config options to handle alternate deployment models (#7473)
* Adds a `VerifyGRPCClientCertIfGiven` boolean to the `remoteva` config
that cause the RVA server to use the less strict
`tls.VerifyClientCertIfGiven` for use with an Amazon Web Services
Application Load Balancer (ALB) between the `boulder-va` and `remoteva`.
See https://github.com/letsencrypt/boulder/issues/7386.

Part of https://github.com/letsencrypt/boulder/issues/5294

---------

Co-authored-by: Samantha <hello@entropy.cat>
2024-05-13 14:43:40 -04:00
Jacob Hoffman-Andrews b7553f1290
docs: add ISSUANCE-CYCLE.md (#7444)
Also update the CA and RA doccomments to link to it and describe the
roles of key functions a little better.

Remove outdated reference to generating OCSP at issuance time.
2024-05-06 13:01:08 -07:00
forcedebug b33d28c8bd
Remove repeated words in comments (#7445)
Signed-off-by: forcedebug <forcedebug@outlook.com>
2024-04-23 10:30:33 -04:00
Aaron Gable c110a3e6c9
Update Review Requirements (#7363)
Make the Review Requirements section of CONTRIBUTING.md more accurately
reflect our actual policy and behavior, and include a clarification for
external contributions.
2024-03-07 15:47:33 -05:00
Phil Porada 6925fad324
Finish migration from int64 timestamps to timestamppb (#7142)
This is a cleanup PR finishing the migration from int64 timestamps to
protobuf `*timestamppb.Timestamps` by removing all usage of the old
int64 fields. In the previous PR
https://github.com/letsencrypt/boulder/pull/7121 all fields were
switched to read from the protobuf timestamppb fields.

Adds a new case to `core.IsAnyNilOrZero` to check various properties of
a `*timestamppb.Timestamp` reducing the visual complexity for receivers.

Fixes https://github.com/letsencrypt/boulder/issues/7060
2023-11-27 13:37:31 -08:00
Jacob Hoffman-Andrews 7d66d67054
It's borpin' time! (#6982)
This change replaces [gorp] with [borp].

The changes consist of a mass renaming of the import and comments / doc
fixups, plus modifications of many call sites to provide a
context.Context everywhere, since gorp newly requires this (this was one
of the motivating factors for the borp fork).

This also refactors `github.com/letsencrypt/boulder/db.WrappedMap` and
`github.com/letsencrypt/boulder/db.Transaction` to not embed their
underlying gorp/borp objects, but to have them as plain fields. This
ensures that we can only call methods on them that are specifically
implemented in `github.com/letsencrypt/boulder/db`, so we don't miss
wrapping any. This required introducing a `NewWrappedMap` method along
with accessors `SQLDb()` and `BorpDB()` to get at the internal fields
during metrics and logging setup.

Fixes #6944
2023-07-17 14:38:29 -07:00
Aaron Gable 62ff373885
Probs: remove divergences from RFC8555 (#6877)
Remove the remaining divergences from RFC8555 regarding what error types
we use in certain situations. Specifically:
- use "invalidContact" instead of "invalidEmail";
- use "unsupportedContact" for contact addresses that use a protocol
other than "mailto:"; and
- use "unsupportedIdentifier" for identifiers that specify a type other
than "dns".
2023-05-15 12:35:12 -07:00
Samantha 9e8101ff3a
main: Validate config files by default (#6885)
- Make config validation run by default for all Boulder components with
a registered validator.
- Refactor main to parse `boulder` flags directly instead of declaring
them as subcommands.
- Remove the `validate` subcommand and update relevant docs.
- Fix configuration validation for issuer (file source) OCSP responder.

Fixes #6857
Fixes #6763
2023-05-15 14:16:04 -04:00
Aaron Gable 1fcd951622
Probs: simplifications and cleanup (#6876)
Make minor, non-user-visible changes to how we structure the probs
package. Notably:
- Add new problem types for UnsupportedContact and
UnsupportedIdentifier, which are specified by RFC8555 and which we will
use in the future, but haven't been using historically.
- Sort the problem types and constructor functions to match the
(alphabetical) order given in RFC8555.
- Rename some of the constructor functions to better match their
underlying problem types (e.g. "TLSError" to just "TLS").
- Replace the redundant ProblemDetailsToStatusCode function with simply
always returning a 500 if we haven't properly set the problem's
HTTPStatus.
- Remove the ability to use either the V1 or V2 error namespace prefix;
always use the proper RFC namespace prefix.
2023-05-12 12:10:13 -04:00
Aaron Gable 8c67769be4
Remove ocsp-updater from Boulder (#6769)
Delete the ocsp-updater service, and the //ocsp/updater library that
supports it. Remove test configs for the service, and remove references
to the service from other test files.

This service has been fully shut down for an extended period now, and is
safe to remove.

Fixes #6499
2023-03-31 14:39:04 -07:00
Samantha 28a7776ed7
docs: Update ACME divergences (#6779)
Update ACME divergences doc to reflect changes made in #6256
2023-03-29 17:22:09 -04:00
Samantha b2224eb4bc
config: Add validation tags to all configuration structs (#6674)
- Require `letsencrypt/validator` package.
- Add a framework for registering configuration structs and any custom
validators for each Boulder component at `init()` time.
- Add a `validate` subcommand which allows you to pass a `-component`
name and `-config` file path.
- Expose validation via exported utility functions
`cmd.LookupConfigValidator()`, `cmd.ValidateJSONConfig()` and
`cmd.ValidateYAMLConfig()`.
- Add unit test which validates all registered component configuration
structs against test configuration files.

Part of #6052
2023-03-21 14:08:03 -04:00
Phil Porada 6c84a69043
Remove MandatoryPOSTasGET flag (#6672)
Remove the `MandatoryPOSTasGET` flag from the WFE2.
Update the ACMEv2 divergence doc to note that neither staging nor
production use MandatoryPOSTasGET.

Fixes #6582.
2023-02-17 13:04:31 -05:00
Phil Porada e3a383208a
Remove ACMEv1 mention from divergence doc (#6673)
The ACMEv1 API has been shut down for a long time and this is part of
ongoing cleanup.
2023-02-17 13:04:14 -05:00
Samantha 5c49231ea6
ROCSP: Remove support for Redis Cluster (#6645)
Fixes #6517
2023-02-09 17:14:37 -05:00
Phil Porada c091e64aa3
Switch from docker-compose to "docker compose" (#6599)
Switch from standalone docker-compose binary to the "docker compose" subcommand everywhere.
2023-01-30 15:04:52 -05:00
Phil Porada 7a65a61ec0
Remove CONTRIBUTING.md policy requiring tests be run for vendored dependencies (#6586)
This policy existed to ensure that, when updating a dependency to a
non-release-tagged commit, we weren't accidentally bringing in a
broken version of that dependency. Since it was instituted, we have
greatly reduced the number of non-versioned dependencies. And we
have extensive tests of our own that should detect if any of the behavior
we use from one of these dependencies is broken. Therefore this
requirement has fallen by the wayside.

Update the document to reflect current practices.
2023-01-12 17:45:03 -08:00
Phil Porada 8bc4005423
Remove some ACMEv1 comments/documentation (#6584)
We shut down the ACMEv1 API in summer of 2021 and no longer have use for
this text. Requested by @aarongable over at
https://github.com/letsencrypt/boulder/pull/6581
2023-01-12 10:56:39 -08:00
Phil Porada 9b21b04787
Update CONTRIBUTING.md (#6563)
Added some improvements as I was reading through this doc.
2023-01-03 18:25:50 -05:00
Samantha 6c6da76400
ROCSP: Replace Redis Cluster with a consistently sharded all-primary nodes (#6516) 2022-12-19 15:06:47 -05:00
Aaron Gable abf8d7c740
Remove unused RevokeCertificateWithReg (#6458)
This gRPC method was deprecated a number of months ago. It has no
callers, and is safe to remove.

Cleanup from #5936
2022-10-21 16:56:13 -07:00
Samantha 90eb90bdbe
test: Replace sd-test-srv with consul (#6389)
- Add a dedicated Consul container
- Replace `sd-test-srv` with Consul
- Add documentation for configuring Consul
- Re-issue all gRPC credentials for `<service-name>.service.consul`

Part of #6111
2022-09-19 16:13:53 -07:00
Samantha bc1bf0fde4
test: Support multiple database schemas (#6344)
In dev docker we've always used a single schema (`boulder_sa`), with two
environments (`test` and `integration`) making for a combined total of two
databases sharing the same users and schema (e.g. `boulder_sa_test` and
`boulder_sa_integration`). There are also two versions of this schema. `db` and
`db-next`. The former is the schema as it should exist in production and the
latter is everything from `db` with some un-deployed schema changes. This change
adds support for additional schemas with the same aforementioned environments
and versions.

- Add support for additional schemas in `test/create_db.sh` and sa/migrations.sh
- Add new schema `incidents_sa` with its own users
- Replace `bitbucket.org/liamstask/goose/` with `github.com/rubenv/sql-migrate`

Part of #6328
2022-09-07 14:59:08 -07:00
Jacob Hoffman-Andrews f98d74c14d
log: emit warnings and errors on stderr (#6325)
Debug and Info messages still go to stdout.

Fix the CAA integration test, which asserted that stderr should be empty
when caa-log-checker finds a problem. That used to be the case because
we never logged to stderr, but now it is the case.

Update the logging docs.

Fixes #6324
2022-08-29 15:00:55 -07:00
Aaron Gable f7ab64f05b
Remove last references to CFSSL (#6155)
Just a docs and config cleanup.
2022-06-14 14:22:34 -07:00
Aaron Gable b3c56a5d05
Reorganize docs and bring in release docs (#6077)
Bring in the release docs from the boulder-release-process repo,
so that they're adjacent to all of our other docs. This allows us to
delete that repo. Also update references to that repo to instead point
to the new doc here.

Also make minor organization updates to other docs to keep the root
of this repository clean.
2022-05-04 12:21:37 -07:00
Jacob Hoffman-Andrews 210735099f
Add documentation of our logging system (#5991) 2022-03-15 10:21:06 -07:00
Jacob Hoffman-Andrews 1ee91fe59f
Add doc and debugging tool for Redis (#5885) 2022-01-18 18:32:37 -08:00
Aaron Gable a216f348cf
Update divergences for mandatory POST-as-GET (#5564)
We do not plan to turn on mandatory POST-as-GET in production
at any time in the immediate future. Update the "divergences" doc
to reflect this.
2021-08-04 17:16:09 -07:00
Jonathan Vanasco 00522861dc
small docs change: minimum key size (#5158)
Implementation Details now mentions minimum RSA key size and
links to the official LetsEncrypt announcement for supporting a limited set
of key sizes.
2020-10-29 12:14:27 -07:00
Jonathan Vanasco 8e8f8bdf6a
Add documentation for RFC-conformant design implementation decisions. (#5105)
@jsha suggested I re-implement a PR against Pebble regarding Authorization
reuse into Boulder (see https://github.com/letsencrypt/pebble/pull/325).

This is an initial attempt. I opted to handle this by creating a new file for
"Implementation Details" that are RFC conformant and are known to have
confused client developers.
2020-10-05 18:03:57 -07:00
Aaron Gable cbef9ac43b
Update acme divergences documentation (#5101)
This change reorganizes the document to have all changes
noted under their respective section headings, updates estimated
resolution dates on long-standing divergences, and updates all URLs
to reference the final RFC 8555 instead of various drafts.

In addition, it adds a note that we do not accept the (optional)
`notBefore` and `notAfter` fields of a `newOrder` request.
2020-09-23 13:37:57 -07:00
Dennis Benzinger | SAP Hybris a92d54ae6d
Fix link to `acme-divergences-v1.md` (#5049) 2020-08-24 14:54:26 -07:00
Jacob Hoffman-Andrews ca26126ca9
Replace master with main. (#4917)
Also, update an example username in mailer tests.
2020-06-30 16:39: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
Daniel McCarney 005cd54eef
docs: update multi-va.md for prod deploy (#4767)
Quick update to docs/multi-va.md to reflect that the feature has been promoted out of the test deployment stage into a production feature.
2020-04-09 15:49:51 -07:00
Daniel McCarney e352227e46
docs: remove stale multi-va feat. flag info (#4670) 2020-02-04 16:34:36 -08:00
Daniel McCarney f1894f8d1d
tidy: typo fixes flagged by codespell (#4634) 2020-01-07 14:01:26 -05:00
Jacob Hoffman-Andrews fa081ac598 docs: add initial documentation of multi-va. (#4615)
This is based on
https://community.letsencrypt.org/t/what-is-the-current-status-of-the-implementation-of-multi-viewpoint-validation/108291/6
2019-12-18 14:53:14 -05:00
Daniel McCarney ff69225a62
docs: update acme-divergences for rfc 8555. (#4203)
We can remove some divergences since in the V2 API:
* We use the correct error namespace.
* We use the correct `Content-Type` for Certificate requests.
* We use the correct `url` field in Challenge objects.
* We use the correct HTTP status code for Challenge POST requests.
2019-05-06 13:15:12 -04:00