Skip to content

Commit

Permalink
config: Improve comment for HMACKeyConfig and add TODOs (#7633)
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy authored Jul 25, 2024
1 parent 92b6a16 commit d9046ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/boulder-wfe2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ type Config struct {
// an HMAC-SHA256 key (e.g. the output of `openssl rand -hex 32`). In a
// multi-DC deployment this value should be the same across all
// boulder-wfe and nonce-service instances.
//
// TODO(#7632) Update this to use the new HMACKeyConfig.
NoncePrefixKey cmd.PasswordConfig `validate:"-"`

// Chains is a list of lists of certificate filenames. Each inner list is
Expand Down
4 changes: 3 additions & 1 deletion cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ type DNSProvider struct {
SRVLookup ServiceDomain `validate:"required"`
}

// HMACKeyConfig contains a path to a file containing an HMAC key.
// HMACKeyConfig specifies a path to a file containing an HMAC key. The key must
// consist of 256 bits of random data to be suitable for use as a 256-bit
// hashing key (e.g., the output of `openssl rand -hex 32`).
type HMACKeyConfig struct {
KeyFile string `validate:"required"`
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/nonce-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ type Config struct {
// suitable as an HMAC-SHA256 key (e.g. the output of `openssl rand -hex
// 32`). In a multi-DC deployment this value should be the same across
// all boulder-wfe and nonce-service instances.
//
// TODO(#7632) Update this to use the new HMACKeyConfig.
NoncePrefixKey cmd.PasswordConfig `validate:"required"`

Syslog cmd.SyslogConfig
Expand Down

0 comments on commit d9046ae

Please sign in to comment.