You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flags.StringVar(&o.ProxyStrategies, "proxy-strategies", o.ProxyStrategies, "The list of proxy strategies used by the server to pick an agent/tunnel, available strategies are: default, destHost, defaultRoute.")
155
160
flags.StringSliceVar(&o.CipherSuites, "cipher-suites", o.CipherSuites, "The comma separated list of allowed cipher suites. Has no effect on TLS1.3. Empty means allow default list.")
161
+
flags.StringVar(&o.TLSMinVersion, "tls-min-version", o.TLSMinVersion, "Minimum TLS version for server connections. Accepted values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13. Empty defaults to VersionTLS12.")
156
162
flags.IntVar(&o.XfrChannelSize, "xfr-channel-size", o.XfrChannelSize, "The size of the two KNP server channels used in server for transferring data. One channel is for data coming from the Kubernetes API Server, and the other one is for data coming from the KNP agent.")
157
163
flags.BoolVar(&o.EnableLeaseController, "enable-lease-controller", o.EnableLeaseController, "Enable lease controller to publish and garbage collect proxy server leases.")
158
164
flags.StringVar(&o.LeaseNamespace, "lease-namespace", o.LeaseNamespace, "The namespace where lease objects are managed by the controller.")
@@ -200,6 +206,7 @@ func (o *ProxyRunOptions) Print() {
200
206
klog.V(1).Infof("LeaseNamespace set to %s.\n", o.LeaseNamespace)
201
207
klog.V(1).Infof("LeaseLabel set to %s.\n", o.LeaseLabel)
202
208
klog.V(1).Infof("CipherSuites set to %q.\n", o.CipherSuites)
209
+
klog.V(1).Infof("TLSMinVersion set to %q.\n", o.TLSMinVersion)
203
210
klog.V(1).Infof("XfrChannelSize set to %d.\n", o.XfrChannelSize)
204
211
klog.V(1).Infof("GracefulShutdownTimeout set to %v.\n", o.GracefulShutdownTimeout)
205
212
}
@@ -329,6 +336,16 @@ func (o *ProxyRunOptions) Validate() error {
329
336
ifo.XfrChannelSize<=0 {
330
337
returnfmt.Errorf("channel size %d must be greater than 0", o.XfrChannelSize)
331
338
}
339
+
// validate the TLS min version
340
+
ifo.TLSMinVersion!="" {
341
+
tlsVer, err:=util.GetTLSVersion(o.TLSMinVersion)
342
+
iferr!=nil {
343
+
returnerr
344
+
}
345
+
iftlsVer<tls.VersionTLS12 {
346
+
klog.Warningf("--tls-min-version=%s is below TLS 1.2 and is considered insecure (RFC 8996)", o.TLSMinVersion)
0 commit comments