Skip to content

Commit

Permalink
fix: disable certificate trust correctly (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
soniqua authored Dec 18, 2024
1 parent 8d3a487 commit 1871613
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion snyk-universal-broker/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ spec:
value: /home/node/tls-cert/tls.key
{{- end }}
{{- end }}
{{- if or (and .Values.tlsRejectUnauthorized (not .Values.caCert)) (and .Values.caCert .Values.disableAllCertificateTrust) }}
{{- if .Values.disableAllCertificateTrust }}
# Troubleshooting - Set to 0 for SSL inspection testing
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
Expand Down
11 changes: 11 additions & 0 deletions snyk-universal-broker/tests/certificate_trust_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,14 @@ tests:
mountPath: /home/node/cacert
readOnly: true
template: statefulset.yaml

- it: disables all CA trust
set:
disableAllCertificateTrust: true
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
template: statefulset.yaml

0 comments on commit 1871613

Please sign in to comment.