Use scoped token for request authz (#15779)

fix: use scoped token for request authz (#15779) (#15800)
Use scoped token for request authz (#15779)f70e8a-fix-use-scoped-token-for-request-authz-cve-2026-41323fixuse scoped token request authz 15779

Committed by JimBugwadia

commit message
fix: use scoped token for request authz (#15779) (#15800)

Cherry-pick of kyverno/kyverno#15779 to release-1.17.
 
Projects a dedicated ServiceAccount token with a Kyverno-specific audience
(kyverno-svc.kyverno.io) for outbound APICall requests. This prevents leaked
tokens from being replayed against the Kubernetes API server.
 
Changes:
- pkg/engine/apicall/executor.go: getToken() reads from the scoped token at
  /var/run/secrets/kyverno/apicall/token; logs at V(2) with error on failure
- Helm chart templates (admission, background, cleanup, reports controllers):
  add apicall-token projected volume + mount with configurable audience/expiry
- charts/kyverno/values.yaml: add apiCallToken.audience and
  apiCallToken.expirationSeconds values (defaults: kyverno-svc.kyverno.io / 3600)
- charts/kyverno/README.md + README.md.gotmpl: document the new values
 
Signed-off-by: Jim Bugwadia <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: shuting <[email protected]>

Editor assessment

This commit patches CVE-2026-41323. This release-1.17 cherry-pick keeps the rationale that matters: scoping the service-account token to a Kyverno-specific audience prevents a leaked token from being replayed against the Kubernetes API server. The body then maps the implementation across the apicall executor's token path, projected volumes and mounts in the admission, background, cleanup and reports controllers, and new chart values for audience and expiry with stated defaults. Documentation updates are listed and the trailers are orderly. Weaknesses are that it enumerates changes more than it argues for them, the two trailing PR numbers clutter the subject, and there is no upgrade guidance for clusters that relied on the ambient token.

Browse categories

More fix examples · Back to search