Skip to content

Commit

Permalink
cmd/contour: Update to TLS 1.3 for xDS between Contour and Envoy (#4065)
Browse files Browse the repository at this point in the history
Signed-off-by: Tero Saarni <tero.saarni@est.tech>
  • Loading branch information
tsaarni authored Nov 9, 2021
1 parent 88fa4c6 commit 6d78450
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions changelogs/unreleased/4065-tsaarni-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## xDS management connection between Contour and Envoy set to TLSv1.3

The minimum accepted TLS version for Contour xDS server is changed from TLSv1.2 to TLSv1.3.
Previously in Contour 1.19, the maximum accepted TLS version for Envoy xDS client was increased to TLSv1.3 which allows it to connect to Contour xDS server using TLSv1.3.

If upgrading from a version **prior to Contour 1.19**, the old Envoys will be unable to connect to new Contour until also Envoys are upgraded.
Until that, old Envoys are unable to receive new configuration data.

For further information, see [Contour architecture](https://projectcontour.io/docs/main/architecture/) and [xDS API](https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol) in Envoy documentation.
4 changes: 2 additions & 2 deletions cmd/contour/servecontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func tlsconfig(log logrus.FieldLogger, contourXDSTLS *contour_api_v1alpha1.TLS)
Certificates: []tls.Certificate{cert},
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: certPool,
MinVersion: tls.VersionTLS12,
MinVersion: tls.VersionTLS13,
}, nil
}

Expand All @@ -202,7 +202,7 @@ func tlsconfig(log logrus.FieldLogger, contourXDSTLS *contour_api_v1alpha1.TLS)
}

return &tls.Config{
MinVersion: tls.VersionTLS12,
MinVersion: tls.VersionTLS13,
ClientAuth: tls.RequireAndVerifyClientCert,
Rand: rand.Reader,
GetConfigForClient: func(*tls.ClientHelloInfo) (*tls.Config, error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/contour/servecontext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func TestTlsVersionDeprecation(t *testing.T) {
tlsConfig, err := preliminaryTLSConfig.GetConfigForClient(nil)
checkFatalErr(t, err)

assert.Equal(t, tlsConfig.MinVersion, uint16(tls.VersionTLS12))
assert.Equal(t, tlsConfig.MinVersion, uint16(tls.VersionTLS13))
}

func checkFatalErr(t *testing.T, err error) {
Expand Down

0 comments on commit 6d78450

Please sign in to comment.