Skip to content

Commit 4a66e02

Browse files
committed
fix(chart): Render --spire-trust-domain independently of signatureVerification.enabled
The trust domain is consumed by two controllers in this operator binary: - **AgentCardReconciler** (signature verification): uses it to build expected SPIFFE IDs when verifying x5c chains on agent card signatures. - **ClientRegistrationReconciler** (operator-managed Keycloak client lifecycle): uses it to build SPIFFE-shaped client IDs of the form spiffe://<trust-domain>/ns/<ns>/sa/<sa> when authbridge-config has SPIRE_ENABLED=true. The chart template gated --spire-trust-domain on signatureVerification.enabled. As a result, clusters that use SPIRE for workload identity but do not enable A2A signature enforcement fail client registration: the reconciler loops with "cannot resolve Keycloak client id yet -- --spire-trust-domain is required" every 30s and no agent ever gets registered in Keycloak. Move --spire-trust-domain out of the signatureVerification.enabled block so it is rendered whenever .Values.signatureVerification.spireTrustDomain is set, regardless of whether signature verification is on. The signature-specific flags (--require-a2a-signature, --signature-audit-mode, --enforce-network-policies, --svid-expiry-grace-period, trust-bundle flags) stay inside the gate. Update the values.yaml comment to describe the new semantics. No default change. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Hai Huang <huang195@gmail.com>
1 parent 02569a9 commit 4a66e02

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

charts/kagenti-operator/templates/manager/manager.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ spec:
4242
{{- if .Values.signatureVerification.enforceNetworkPolicies }}
4343
- "--enforce-network-policies=true"
4444
{{- end }}
45-
{{- if .Values.signatureVerification.spireTrustDomain }}
46-
- "--spire-trust-domain={{ .Values.signatureVerification.spireTrustDomain }}"
47-
{{- end }}
4845
{{- if .Values.signatureVerification.spireTrustBundle.configMapName }}
4946
- "--spire-trust-bundle-configmap={{ .Values.signatureVerification.spireTrustBundle.configMapName }}"
5047
{{- end }}
@@ -61,6 +58,19 @@ spec:
6158
- "--svid-expiry-grace-period={{ .Values.signatureVerification.svidExpiryGracePeriod }}"
6259
{{- end }}
6360
{{- end }}
61+
{{/*
62+
--spire-trust-domain is rendered independently of
63+
signatureVerification.enabled. The flag is also consumed by the
64+
ClientRegistrationReconciler, which resolves SPIFFE client IDs of
65+
the form spiffe://<trust-domain>/ns/<ns>/sa/<sa> when
66+
authbridge-config has SPIRE_ENABLED=true. Gating it on signature
67+
verification would break operator-managed client registration in
68+
clusters that use SPIRE for workload identity but do not enable
69+
A2A signature enforcement.
70+
*/}}
71+
{{- if .Values.signatureVerification.spireTrustDomain }}
72+
- "--spire-trust-domain={{ .Values.signatureVerification.spireTrustDomain }}"
73+
{{- end }}
6474
command:
6575
- {{ .Values.controllerManager.container.cmd }}
6676
image: {{ .Values.controllerManager.container.image.repository }}:{{ .Values.controllerManager.container.image.tag }}

charts/kagenti-operator/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ signatureVerification:
100100
auditMode: false
101101
# Enforce network policies based on signature verification
102102
enforceNetworkPolicies: false
103-
# SPIRE trust domain (required when enabled)
103+
# SPIRE trust domain. Required when SPIRE is enabled in the cluster even if
104+
# signatureVerification.enabled is false: the ClientRegistrationReconciler
105+
# uses this to build SPIFFE-shaped Keycloak client IDs
106+
# (spiffe://<trust-domain>/ns/<ns>/sa/<sa>) whenever authbridge-config has
107+
# SPIRE_ENABLED=true. The chart renders --spire-trust-domain independently of
108+
# signatureVerification.enabled for this reason.
104109
spireTrustDomain: ""
105110
# Key within the SPIRE trust bundle ConfigMap. Matches the SPIRE hardened Helm chart default
106111
# and the binary flag default. Override to "bundle.crt" only for older ZTWIM deployments.

0 commit comments

Comments
 (0)