@@ -97,6 +97,17 @@ func serve(cmd *cobra.Command, args []string) error {
9797
9898 var grpcOptions []grpc.ServerOption
9999
100+ allowedTLSCiphers := []uint16 {
101+ tls .TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ,
102+ tls .TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,
103+ tls .TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ,
104+ tls .TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ,
105+ tls .TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 ,
106+ tls .TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 ,
107+ tls .TLS_RSA_WITH_AES_128_GCM_SHA256 ,
108+ tls .TLS_RSA_WITH_AES_256_GCM_SHA384 ,
109+ }
110+
100111 if c .GRPC .TLSCert != "" {
101112 // Parse certificates from certificate file and key file for server.
102113 cert , err := tls .LoadX509KeyPair (c .GRPC .TLSCert , c .GRPC .TLSKey )
@@ -107,6 +118,7 @@ func serve(cmd *cobra.Command, args []string) error {
107118 tlsConfig := tls.Config {
108119 Certificates : []tls.Certificate {cert },
109120 MinVersion : tls .VersionTLS12 ,
121+ CipherSuites : allowedTLSCiphers ,
110122 PreferServerCipherSuites : true ,
111123 }
112124
@@ -262,6 +274,7 @@ func serve(cmd *cobra.Command, args []string) error {
262274 Addr : c .Web .HTTPS ,
263275 Handler : serv ,
264276 TLSConfig : & tls.Config {
277+ CipherSuites : allowedTLSCiphers ,
265278 PreferServerCipherSuites : true ,
266279 MinVersion : tls .VersionTLS12 ,
267280 },
0 commit comments