Repository navigation
fix(helm): reject mismatched trust-manager TLS namespaces - #783
Conversation
|
Agent-generated adversarial security review Verified immutable head: Whole-PR range: Verdict: no findings. The guard rejects enabled bundled trust-manager in Helm-certificate mode when its effective child namespace differs from the Helm release namespace. It permits cert-manager mode, disabled dependencies, and SIE/Bundle-source namespace settings that do not relocate the TLS producer. The error names both actual namespaces and provides supported remediation. It neither silently moves credentials nor changes the pinned dependency. I did not author the change. This review independently inspected the full rebased diff and pinned sources, rendered copied charts, tested mutations, and matched all five tested source files to Pinned contract and integrationChart.lock pins trust-manager v0.13.0. Its The rebased credential fixture now uses Helm TLS in the release namespace The resolved CI diff preserves the existing credential suite and its tooling-lane exclusion, adds the namespace suite/exclusion, and runs both suites after Helm dependency preparation. The README now describes rejection rather than merely advising operators to avoid the mismatch; its remediation matches the error. Independent verification
Four copied-template mutations were caught on the final head:
Preparation review also independently exercised six custom release/name/namespace combinations. Final persistent tests close the preparation coverage recommendation: custom release namespaces are now part of the repository suite. Prior preparation artifacts remain unchanged; this report supersedes their pending-immutable-head qualification.
Sibling coverage and limitsAn independent This is a render-time validation fix. No live Kubernetes install/upgrade, certificate issuance, TLS handshake, Secret content lookup, hosted endpoint, external service mutation, or registry binary was exercised. Certificate-generation mode and namespaces were verified from the pinned templates and rendered objects. No token or certificate private-key payload was printed or read from a live cluster. Immutable source record
Blocking findings: 0 |
|
Merged as Remote validation: 537 existing Helm render tests, 359 dependency-credential tests, all 12 namespace regressions, 15,320 public unit tests, and 611 tooling tests passed. The independent adversarial security review verified this exact head and reported zero blocking findings. This closes #781. The guard rejects the pinned dependency's mismatched Helm-generated TLS namespace configuration; it preserves supported matching namespaces and cert-manager mode. No deployment or live setting was changed. Arbitrary operator credential layouts remain tracked separately in #780. |
With bundled trust-manager's Helm certificate mode enabled, a child namespace override puts the Deployment in that namespace while the pinned dependency generates its TLS Secret and certificate DNS in the Helm release namespace. The chart currently renders this inconsistent configuration successfully. Reject that combination during the existing TLS validation, with a clear choice of using the release namespace or cert-manager certificate generation.
Use the enabled child context and its namespace helper. Disabled dependencies, a separate namespace in cert-manager mode, SIE's independent global namespace, the Bundle source namespace, and non-default Helm release names/namespaces retain their supported behavior. Dependency versions, CRDs, certificate contents, and deployment defaults are unchanged. The latest inspected upstream release still has the same split; source evidence is in #781.
Update the earlier credential-separation test to exercise a valid cross-namespace Helm-TLS consumer (SIE workloads in another namespace), while dedicated tests now require the intrinsically inconsistent child-namespace combination to fail. README consistently documents that render failure.
Closes #781.
Validation
Sibling-sweep evidence
Bug class: a chart-generated TLS Secret/certificate DNS uses a different namespace authority from the consuming Deployment.
Full pinned-dependency output (archives extracted from the unchanged Chart.lock):
All four generator matches belong to the guarded trust-manager Helm mode. I additionally inspected the other pinned certificate producers: KEDA's cert-manager objects and serving Pods consistently use Release.Namespace; Prometheus's certificate objects, certgen Job arguments and serving Deployments use the child namespace helper; cert-manager's dynamic serving uses POD_NAMESPACE from its namespaced Deployment. Trust-manager's cert-manager mode uses its helper consistently and is covered by a rendered producer/consumer test. First-party self-signed/ACME resources use the existing SIE namespace / explicit cert-manager cluster-resource namespace contract; externally configured Issuers, raw provider settings and arbitrary mounts remain bounded operator configuration as assessed in #780. No other matching Helm-generated namespace split was found. No live cluster or Secret content was inspected.
Summary by CodeRabbit
Bug Fixes
Documentation
Tests