Added flag for insecureSkipVerfiy (#1829)
This commit is contained in:
@@ -677,7 +677,9 @@ spec:
|
||||
- name: TLS_ENABLED
|
||||
value: "true"
|
||||
- name: MESSAGE_QUEUE_SECRETS
|
||||
value: /etc/fission/secrets
|
||||
value: /etc/fission/secrets
|
||||
- name: INSECURE_SKIP_VERIFY
|
||||
value: "{{ .Values.kafka.authentication.tls.insecureSkipVerify }}"
|
||||
volumeMounts:
|
||||
- name: kafka-secrets
|
||||
mountPath: /etc/fission/secrets
|
||||
|
||||
@@ -184,6 +184,8 @@ kafka:
|
||||
authentication:
|
||||
tls:
|
||||
enabled: false
|
||||
# InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name.
|
||||
insecureSkipVerify: false # Warning: Setting this to true, makes TLS susceptible to man-in-the-middle attacks
|
||||
caCert: "" # path to certificate containing public key of CA authority
|
||||
userCert: "" # path to certificate containing public key of the user signed by CA authority
|
||||
userKey: "" # path to private key of the user
|
||||
|
||||
@@ -201,8 +201,12 @@ func (kafka Kafka) getTLSConfig() (*tls.Config, error) {
|
||||
|
||||
tlsConfig.Certificates = []tls.Certificate{cert}
|
||||
|
||||
skipVerify, err := strconv.ParseBool(os.Getenv("INSECURE_SKIP_VERIFY"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
kafka.logger.Error("failed to parse value of env variable INSECURE_SKIP_VERIFY taking default value false, expected boolean value: true/false",
|
||||
zap.String("received", os.Getenv("INSECURE_SKIP_VERIFY")))
|
||||
} else {
|
||||
tlsConfig.InsecureSkipVerify = skipVerify
|
||||
}
|
||||
|
||||
caCertPool := x509.NewCertPool()
|
||||
|
||||
Reference in New Issue
Block a user