fix(helm): honor empty clientCaSecretName for HTTPS-only mode - #2235
fix(helm): honor empty clientCaSecretName for HTTPS-only mode#2235lunarwhite wants to merge 2 commits into
Conversation
320bc9c to
8fcc2f5
Compare
TaylorMutch
left a comment
There was a problem hiding this comment.
Looks good overall. Helm unit tests (69/69), lint, and an HTTPS-only render all pass.
One follow-up: please update .agents/skills/debug-openshell-cluster/SKILL.md to note that clientCaSecretName: "" intentionally omits the client-CA config and volume, with authentication provided by OIDC or a trusted proxy. Repository instructions require this skill update for gateway deployment changes.
Great suggestion. Added into a separate commit for easy review: 47199bd |
|
This pull request has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. |
|
Hi @elezar, may I request a review from your side please? It seems Taylor has been on leave for some time. 🙂 |
47199bd to
d63daa6
Compare
|
Hey @krishicks, would you please take a look at this Helm change, or help route this to proper reviewers. It's been opened for a while and seems maintainers I tagged before aren't around these days. Thanks in advance. |
d63daa6 to
7ea26ee
Compare
|
Hi @johntmyers, I saw you comment here #2094 (comment), would you mind taking a look for this one as well? I just rebased to resolve new conflict. Thank you. |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Validation: This is a focused, project-valid Helm fix for linked bug #2095.
Head SHA: 7ea26ee79ef63f9670926dab64ab17893aba3647
Base SHA: 44bf0df485f15c2992b04c1d597e6967b4b37bcd
Merge base SHA: 44bf0df485f15c2992b04c1d597e6967b4b37bcd
Patch ID: 684de6a7940d22958c9a8f24e7d1e7d045589690
Gator payload: 4
Review mode: initial
Previous reviewed SHA: none
Review budget exhausted: no
Maintainer decision required: no
Blocking findings:
GATOR-7ea26ee7-01: HTTPS-only mode also suppresses independently configured external server-certificate selection.
Carried findings:
- None
Non-blocking suggestions:
- None
Docs: Fern docs and the required gateway debugging skill are updated.
Next state: gator:in-review
| [openshell.gateway.tls] | ||
| cert_path = "/etc/openshell-tls/server/tls.crt" | ||
| key_path = "/etc/openshell-tls/server/tls.key" | ||
| {{- if eq (include "openshell.gatewayClientCaEnabled" .) "true" }} |
There was a problem hiding this comment.
gator-agent
Warning — GATOR-7ea26ee7-01
Invariant: Disabling client-certificate verification must not disable independently configured external server-certificate selection.
Prerequisite: An operator enables a cert-manager external server certificate through certManager.serverIssuerRef and explicitly sets server.tls.clientCaSecretName="" for the documented HTTPS-only mode.
Entry point → sink: A supported Helm install/upgrade with that values combination → the rendered gateway ConfigMap consumed by the TLS listener.
Base → head: The base rendered external certificate fields whenever serverIssuerRef.name was set; this new enclosing conditional suppresses those fields whenever client-CA verification is disabled.
Impact: The gateway can present its internal certificate instead of the configured external certificate, causing browser and CLI hostname or trust failures on this documented deployment path.
Reproducer: Render templates/gateway-config.yaml with certManager.enabled=true, a non-empty certManager.serverIssuerRef.name, certManager.serverDnsNames=[gateway.example.com], and server.tls.clientCaSecretName="". client_ca_path should be absent while external_cert_path, external_key_path, and external_server_names remain present; current head omits all four.
PR ownership: This PR introduces the enclosing conditional and documents this exact HTTPS/OIDC configuration; the base did not couple external certificate rendering to client-CA enablement.
Requested change: Close this conditional immediately after client_ca_path, leave the serverIssuerRef block outside it, and add the corresponding Helm regression test.
Signed-off-by: Yuedong Wu <dwcn22@outlook.com>
…ll-cluster Signed-off-by: Yuedong Wu <dwcn22@outlook.com>
7ea26ee to
ecb3e3c
Compare
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Thanks @lunarwhite. I checked the latest author delta against the prior external-certificate finding and confirmed the conditional now ends immediately after client_ca_path; the new Helm regression test also preserves the independently configured external certificate fields.
Validation: This remains a focused, project-valid Helm fix for linked bug #2095.
Head SHA: ecb3e3cbe1ca8443d8f83af661e6c1b923cb025f
Base SHA: 877ddbacb4b915fa1d5bc6f02302d9a5c13a18e1
Merge base SHA: 877ddbacb4b915fa1d5bc6f02302d9a5c13a18e1
Patch ID: 3405051f43edc44c8b33672c58be71c5b777ea70
Gator payload: 4
Review mode: follow_up
Previous reviewed SHA: 7ea26ee79ef63f9670926dab64ab17893aba3647
Review budget exhausted: no
Maintainer decision required: no
Blocking findings:
- No blocking findings remain.
Carried findings:
GATOR-7ea26ee7-01: resolved by the latest template fix and regression test.
Docs: Fern docs and the required gateway debugging skill are updated.
Next state: gator:in-review pending required E2E dispatch; move to gator:watch-pipeline after the current-head workflows are confirmed queued, running, or complete.
|
Label |
|
/ok to test ecb3e3c |
|
Label |
|
The failing job looks unrelated to this PR's diff: https://github.com/NVIDIA/OpenShell/actions/runs/32084342750/job/95556863310?pr=2235#step:12:578 From the full raw log, no server-side I'm afraid we need to re-trigger the failing test. @johntmyers What do you think? |
Summary
Fix a Helm chart bug where
server.tls.clientCaSecretName=""was documented as HTTPS-only mode but the chart still renderedclient_ca_pathingateway.tomland mounted thetls-client-cavolume when built-in PKI or cert-manager shared-CA paths were active. The gateway then required client certificates, causing browserERR_BAD_SSL_CLIENT_AUTH_CERTfailures on direct TLS + OIDC setups.Introduce a shared
openshell.gatewayClientCaEnabledpredicate so an explicit empty value disables client-CA wiring in both the ConfigMap and the gateway workload, overriding built-in PKI and cert-manager defaults.Related Issue
Fixes #2095
Changes
openshell.gatewayClientCaEnabledhelper; use it ingateway-config.yamland_gateway-workload.tplfor TOML, volume, and volumeMountcertManager.serverIssuerRefexternal server-certificate fields (external_cert_path,external_key_path,external_server_names) independent of the client-CA opt-out, with a regression test covering both set togetherserver.tls.clientCaSecretName=""as an explicit HTTPS-only opt-out before PKI/cert-manager fallbacksserver.tls.clientCaSecretNameis set tonull(chart expects""or omit the key)docs/kubernetes/access-control.mdxanddocs/reference/gateway-config.mdxTesting
mise run pre-commitpasses--set server.tls.clientCaSecretName="": noclient_ca_pathin ConfigMap, notls-client-cavolume, gateway logs omit "TLS client certificate verification enabled"; upgrade path verifiedChecklist