Skip to content

Commit b7c1206

Browse files
Added HTTPS proxy support for Wiz Kubernetes Integration (#590)
Co-authored-by: nitzanzuler <[email protected]>
1 parent 1a2b5c9 commit b7c1206

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

wiz-kubernetes-integration/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: wiz-kubernetes-integration
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.2.87
5+
version: 0.2.88
66
appVersion: ""
77

88
# Dependencies for wiz-kubernetes connector and wiz-admission-controller and wiz-sensor

wiz-kubernetes-integration/templates/secret-proxy.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@
44

55
{{- if and .Values.global.httpProxyConfiguration.enabled .Values.global.httpProxyConfiguration.create }}
66
{{- if hasPrefix "https://" .Values.global.httpProxyConfiguration.httpsProxy }}
7-
{{- fail "Error: httpsProxy must start with 'http://', https or any other protocol is not supported." }}
7+
{{- if index .Values "wiz-kubernetes-connector" "enabled" }}
8+
{{- fail "Error: httpsProxy must start with 'http://', https or any other protocol is not supported for the Wiz Kubernetes Connector or the Wiz Broker." }}
9+
{{- end }}
10+
{{- if empty .Values.global.httpProxyConfiguration.clientCertificate }}
11+
{{- fail "Error: HTTPS proxy requires a client certificate. Please provide clientCertificate in httpProxyConfiguration." }}
12+
{{- end }}
13+
{{- else }}
14+
{{- if not (empty .Values.global.httpProxyConfiguration.clientCertificate) }}
15+
{{- fail "Error: Client certificate is only supported for HTTPS proxies. Please remove clientCertificate or use an HTTPS proxy." }}
16+
{{- end }}
817
{{- end }}
18+
919
apiVersion: v1
1020
kind: Secret
1121
type: Opaque
@@ -32,4 +42,5 @@ stringData:
3242
httpsProxy: {{ .Values.global.httpProxyConfiguration.httpsProxy | quote }}
3343
noProxyAddress: {{ .Values.global.httpProxyConfiguration.noProxyAddress | quote }}
3444
caCertificate: {{ .Values.global.httpProxyConfiguration.caCertificate | quote }}
45+
clientCertificate: {{ .Values.global.httpProxyConfiguration.clientCertificate | quote }}
3546
{{- end }}

wiz-kubernetes-integration/values.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,23 @@ global:
4545

4646
# Should a Secret be created by the chart or not.
4747
# Set this to false if you wish to create the Secret yourself or using another tool.
48-
# The Secret should contain httpProxy, httpsProxy, noProxyAddress and caCertificate.
48+
# The Secret should contain httpProxy, httpsProxy, noProxyAddress, caCertificate and clientCertificate.
4949
create: true
5050
secretName: "wiz-proxy" # The name of the proxy Secret.
5151
annotations: {} # Annotations to be set on the secret
52-
52+
5353
httpProxy: "" # URL to use as a proxy for outbound HTTP traffic.
5454
httpsProxy: "" # URL to use as a proxy for outbound HTTPS traffic.
5555
noProxyAddress: # Comma or space-separated list of machine or domain names. Note: This does not affect the Sensor.
56-
56+
5757
# Proxy CA certificate in PEM format. This is required for TLS intercept proxies
5858
# This value is currently only used by the wiz sensor.
5959
caCertificate: ""
6060

61+
# (optional) Proxy client certificate in PEM format. This is required for client certificate authentication.
62+
# The file should contain a certificate and a private key in PEM format.
63+
clientCertificate: ""
64+
6165
image:
6266
registry: "" # Registry to get the container images from.
6367
pullPolicy: "" # Container image pull policy. One of Always, Never, IfNotPresent.

0 commit comments

Comments
 (0)