Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: support setting min version to TLS1.3 #23713

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/23713.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
tls: Allow setting the `tls_min_version` field to `"tls13"`
```
1 change: 1 addition & 0 deletions helper/tlsutil/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var supportedTLSVersions = map[string]uint16{
"tls10": tls.VersionTLS10,
"tls11": tls.VersionTLS11,
"tls12": tls.VersionTLS12,
"tls13": tls.VersionTLS13,
}

// supportedTLSCiphers are the complete list of TLS ciphers supported by Nomad
Expand Down
4 changes: 1 addition & 3 deletions helper/tlsutil/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,7 @@ func TestConfig_ParseMinVersion_Invalid(t *testing.T) {

require := require.New(t)

invalidVersions := []string{"tls13",
"tls15",
}
invalidVersions := []string{"ssl3", "tls14", "tls15"}

for _, version := range invalidVersions {
parsedVersion, err := ParseMinVersion(version)
Expand Down
2 changes: 1 addition & 1 deletion nomad/structs/config/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type TLSConfig struct {
TLSCipherSuites string `hcl:"tls_cipher_suites"`

// TLSMinVersion is used to set the minimum TLS version used for TLS
// connections. Should be either "tls10", "tls11", or "tls12".
// connections. Should be either "tls10", "tls11", "tls12", "tls13".
TLSMinVersion string `hcl:"tls_min_version"`

// TLSPreferServerCipherSuites controls whether the server selects the
Expand Down
8 changes: 7 additions & 1 deletion website/content/docs/configuration/tls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@ the [Enable TLS Encryption for Nomad Tutorial](/nomad/tutorials/transport-securi
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256.

Nomad does not accept explicit ciphersuite configuration when for TLS 1.3
because the Go team has already designated a select set of ciphers that align
with the broadly-accepted Mozilla Security/Server Side TLS guidance for
[modern TLS configuration][modern-tls].

~> **Warning:** the use of insecure cipher suites such as TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, and TLS_RSA_WITH_AES_128_CBC_SHA256 is now unsupported.

- `tls_min_version` `(string: "tls12")`- Specifies the minimum supported version
of TLS. Accepted values are "tls10", "tls11", "tls12".
of TLS. Accepted values are "tls10", "tls11", "tls12", "tls13".

- `tls_prefer_server_cipher_suites` `(bool: false)` - Specifies whether
TLS connections should prefer the server's ciphersuites over the client's.
Expand Down Expand Up @@ -129,3 +134,4 @@ connections will be closed. This process works when upgrading to TLS,
downgrading from it, as well as rolling certificates.

[raft]: https://github.com/hashicorp/serf 'Serf by HashiCorp'
[modern-tls]: https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility