Repository navigation
fix(helm): harden client certificate auth values and probe over HTTPS when HTTP is off - #99
Andre Coetzee (Andre153) wants to merge 2 commits into
Conversation
… when HTTP is off Follow-ups to the client certificate (mTLS) values. socket.clientMtls.enabled, require and the new skipImageVersionCheck take true or false only; anything else fails the render. Before, the string "false" turned mTLS on and a typo in require reached the firewall as log-only. An unset require renders true. With mTLS on, the render fails when image.tag starts with a major.minor version older than 2.15: that image ignores client_mtls and would check no certificate. The install notes say what is enforced and warn when the Service or an Ingress ends TLS before the pod, or when the log level hides the log-only lines. With ports.disableHttp the liveness and readiness probes use HTTPS. Before, they stayed on the HTTP port and the pod never became ready. The Secret key names fall back to their defaults in the template, so `helm upgrade --reuse-values` from an older chart works with mTLS on. Bump the chart to 0.11.26. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
PR SummaryMedium Risk Overview Client mTLS configuration is hardened at render time: new Operational fixes: when Reviewed by Cursor Bugbot for commit aa1f7f2. Configure here. |
|
Claude (@claude) review |
|
Cursor (@cursor) review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit aa1f7f2. Configure here.
There was a problem hiding this comment.
🟡 Changes recommended
The Helm helper accepts empty-string switches and malformed clientMtls values, allowing invalid configurations to silently disable mTLS authentication instead of failing validation.
2 open issues
What changed in this PR
This PR hardens the Helm chart’s client certificate authentication introduced in #98 and fixes health probes for HTTPS-only deployments. It also improves upgrade compatibility and releases chart version 0.11.26.
Changes:
- Adds mTLS value validation, an image-version guard, and deployment warnings.
- Switches probes to HTTPS when HTTP is disabled and supplies fallback Secret key names for
--reuse-valuesupgrades. - Updates documentation and aligns CloudFormation’s chart version default.
| File | Description |
|---|---|
helm/values.yaml |
Documents validation, version-check override, and HTTPS probes. |
helm/templates/NOTES.txt |
Adds mTLS enforcement guidance and configuration warnings. |
helm/templates/deployment.yaml |
Updates mTLS checks, probes, and Secret key defaults. |
helm/templates/configmap.yaml |
Invokes validation and defaults certificate enforcement to true. |
helm/templates/_helpers.tpl |
Adds mTLS boolean parsing and image-version validation. |
helm/README.md |
Explains validation, authentication alternatives, and excluded routes. |
helm/Chart.yaml |
Bumps chart version to 0.11.26. |
cloudformation/README.md |
Documents the updated chart default. |
cloudformation/firewall-eks.yaml |
Sets the chart version default to 0.11.26. |
Review effort: Balanced
Julian Gruber (juliangruber)
left a comment
There was a problem hiding this comment.
I have never used helm, so I think it's better for someone else to review. Tell me if I should skill up instead
Review follow-up on the client certificate auth hardening. - An empty string for enabled, require or skipImageVersionCheck now fails the render. Before, it took the default, so `--set-string socket.clientMtls.enabled=` rendered with mTLS off. - socket.clientMtls set to false, 0, "" or [] now fails the map check. Before, `default dict` turned each into an empty map and the render passed with mTLS off. Only a missing or null block counts as empty. - The map error prints at most 40 characters of the bad value. - Install notes: with mTLS on and a ClusterIP Service, the production hint no longer suggests an Ingress, which would end TLS before the pod. - Comments and docs: a blank value in a values file is null and takes the default; the reason semverCompare is not used is stated correctly. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

What & why
Follow-ups to #98 (client certificate auth), found while testing it. With default values, and with mTLS on and valid values, the rendered manifests are unchanged apart from the chart version label and the checksum annotation.
socket.clientMtls.enabled,requireand the newskipImageVersionChecktaketrueorfalseonly (boolean or string). Anything else fails the render. Before,--set-string socket.clientMtls.enabled=falseturned mTLS on, and a typo inrequirereached the firewall as log-only. An unset or nullrequirenow renderstrue.image.tagstarts with amajor.minorversion older than 2.15. That image ignoresclient_mtls, so the release would look protected while checking no certificate.skipImageVersionCheck: trueis the way out for a re-tagged image. A tag that does not start withmajor.minor(latest, a bare digest, a custom name) is not checked.service.httpsTargetPortsends the HTTPS port to the pod's plain-HTTP port,ingress.enabledis true,socket.logLevelwarnorerror, which hides the log-only lines (they are notice level).ports.disableHttp: truethe liveness and readiness probes use HTTPS. Before, they stayed on the HTTP port and the pod never became ready.--reuse-valuesupgrades. The Secret key names fall back to their defaults in the template. Before,helm upgrade --reuse-valuesfrom a chart older than 0.11.25 with mTLS switched on rendered an empty key and Kubernetes rejected the Deployment.Chart 0.11.26.
Testing
helm lintpasses. The pin check fromchart-checks.yamlpasses when run by hand.helm templatematrix: boolean, string, number, null and missing values for each on/off value; a missing or non-mapsocket.clientMtls; 30 tag shapes for the version check (2.14.2,v2.14.0,2.14,2.14.2.1,2.14.2-internal,2.14.2@sha256:…,2.15.0-rc1,latest, …); every combination of the three install-note warnings with and without a bearer or basic credential.kubectl port-forward:main(0.11.25)ports.disableHttp: true, mTLS enforcing/health, no certificatelogLevel: warnhelm upgrade --reuse-valuesfrom 0.11.24 with mTLS onsecret.items[0].key: Required valueThe Ingress and
httpsTargetPortwarnings were checked in rendering only. The CRL path is unchanged and was not re-tested.🤖 Generated with Claude Code