Commit Graph

6 Commits

Author SHA1 Message Date
Phil Porada d3845f25c6
Strict YAML parsing (#6652)
Adds a custom YAML unmarshaller in the `//strictyaml` package based on
`go-yaml/yaml v3` with unique key detection enabled and ensures that
target struct is able to contain all target fields.

Fixes https://github.com/letsencrypt/boulder/issues/3344.
2023-02-22 14:56:26 -05:00
Jacob Hoffman-Andrews ad840b4410
reloader: log reload events directly (#6398)
Previously, the reloader relied on user code to log errors and changes.
But this led to gaps (for instance the RA not logging reloads of the rate
limit file). Instead, make the reloader responsible for this.

This allowed removing the error callback, at the minor cost of removing
the status gauge for the ECDSA allowlist.
2022-09-23 14:41:54 -07:00
Aaron Gable 1a6f7154d8
Update yaml from v2.4.0 to v3.0.1 (#6146)
The gopkg.in/yaml.v2 package has a potential crash when
parsing malicious input. Although we only use the yaml
package to parse trusted configuration, update to v3 anyway.
2022-06-14 13:53:58 -07:00
Samantha d574b50c41
CA: Deprecate field ECDSAAllowedAccounts (#5477)
- Remove field `ECDSAAllowedAccounts` from CA
- Remove `ECDSAAllowedAccounts` from CA tests
- Replace `ECDSAAllowedAccounts` with `ECDSAAllowListFilename` in
  `test/config/ca-a.json` and `test/config/ca-b.json`
- Add YAML allow list file at `test/config/ecdsaAllowList.yml`

Fixes #5394
2021-06-11 12:13:01 -07:00
Samantha 1f19eee55b
CA: Fix startup bug caused by ECDSA allow list reloader (#5412)
Solve a nil pointer dereference of `ecdsaAllowList` in `boulder-ca` by
calling `reloader.New()` in constructor `ca.NewECDSAAllowListFromFile`
instead.

- Add missing entry `ECDSAAllowListFilename` to
  `test/config-next/ca-a.json` and `test/config-next/ca-b.json`
- Add missing file ecdsaAllowList.yml to `test/config-next`
- Add missing entry `ECDSAAllowedAccounts` to `test/config/ca-a.json`
  and `test/config/ca-b.json`
- Move creation of the reloader to `NewECDSAAllowListFromFile`

Fixes #5414
2021-05-17 14:41:15 -07:00
Samantha 8912c7c24d
CA: Load and reload ECDSA allow list from a file (#5392)
- Add field `ECDSAAllowListFilename` to `config.CA`
- Move ECDSA allow list logic from `boulder-ca/main.go` to new file
  `ca/ecdsa_allow_list.go`
- Add field `ecdsaAllowList` to `certificateAuthorityImpl`
- Update units test to account for changes to `certificateAuthorityImpl`
- Move previous allow list unit tests to `TestDeprecatedECDSAAllowList`
- Add `TestECDSAAllowList` units tests

Fixes #5361
2021-05-10 13:19:46 -07:00