Added flag for insecureSkipVerfiy (#1829)
This commit is contained in:
@@ -678,6 +678,8 @@ spec:
|
|||||||
value: "true"
|
value: "true"
|
||||||
- name: MESSAGE_QUEUE_SECRETS
|
- name: MESSAGE_QUEUE_SECRETS
|
||||||
value: /etc/fission/secrets
|
value: /etc/fission/secrets
|
||||||
|
- name: INSECURE_SKIP_VERIFY
|
||||||
|
value: "{{ .Values.kafka.authentication.tls.insecureSkipVerify }}"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: kafka-secrets
|
- name: kafka-secrets
|
||||||
mountPath: /etc/fission/secrets
|
mountPath: /etc/fission/secrets
|
||||||
|
|||||||
@@ -184,6 +184,8 @@ kafka:
|
|||||||
authentication:
|
authentication:
|
||||||
tls:
|
tls:
|
||||||
enabled: false
|
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
|
caCert: "" # path to certificate containing public key of CA authority
|
||||||
userCert: "" # path to certificate containing public key of the user signed by CA authority
|
userCert: "" # path to certificate containing public key of the user signed by CA authority
|
||||||
userKey: "" # path to private key of the user
|
userKey: "" # path to private key of the user
|
||||||
|
|||||||
@@ -201,8 +201,12 @@ func (kafka Kafka) getTLSConfig() (*tls.Config, error) {
|
|||||||
|
|
||||||
tlsConfig.Certificates = []tls.Certificate{cert}
|
tlsConfig.Certificates = []tls.Certificate{cert}
|
||||||
|
|
||||||
|
skipVerify, err := strconv.ParseBool(os.Getenv("INSECURE_SKIP_VERIFY"))
|
||||||
if err != nil {
|
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()
|
caCertPool := x509.NewCertPool()
|
||||||
|
|||||||
Reference in New Issue
Block a user