Skip to content

Commit

Permalink
Merge pull request #194 from NikitaSkrynnik/tls12
Browse files Browse the repository at this point in the history
Set minumum TLS version to 1.2
  • Loading branch information
denis-tingaikin authored May 29, 2022
2 parents e956530 + fad6ba0 commit 8230a6a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package main

import (
"context"
"crypto/tls"
"io/ioutil"
"net/url"
"os"
Expand Down Expand Up @@ -164,6 +165,11 @@ func main() {
}
logger.Infof("SVID: %q", svid.ID)

tlsClientConfig := tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny())
tlsClientConfig.MinVersion = tls.VersionTLS12
tlsServerConfig := tlsconfig.MTLSServerConfig(source, source, tlsconfig.AuthorizeAny())
tlsServerConfig.MinVersion = tls.VersionTLS12

// ********************************************************************************
logger.Infof("executing phase 3: getting kubernetes config and pod description")
// ********************************************************************************
Expand Down Expand Up @@ -202,7 +208,7 @@ func main() {
grpc.Creds(
grpcfd.TransportCredentials(
credentials.NewTLS(
tlsconfig.MTLSServerConfig(source, source, tlsconfig.AuthorizeAny()),
tlsServerConfig,
),
),
),
Expand All @@ -229,7 +235,7 @@ func main() {
grpc.WithTransportCredentials(
grpcfd.TransportCredentials(
credentials.NewTLS(
tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny()),
tlsClientConfig,
),
),
),
Expand Down

0 comments on commit 8230a6a

Please sign in to comment.