Skip to content

fix(helm): restrict certificate Secret write permissions - #681

Merged
jmclong (jmclong) merged 1 commit into
Azure:mainfrom
Hrishikeshkashyap:fix/certificate-secret-write-rbac
Oct 26, 2026
Merged

jmclong (jmclong) merged 1 commit into
Azure:mainfrom
Hrishikeshkashyap:fix/certificate-secret-write-rbac

Conversation

@Hrishikeshkashyap

@Hrishikeshkashyap Hrishikesh Kashyap (Hrishikeshkashyap) commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Split the certificate Role into namespace-wide Secret reads and name-restricted writes.
  • Allow patch and update only on {{ .Values.name }}-webhook-cert, matching the manager's configured certificate Secret.
  • Retain namespace-wide get/list/watch for compatibility with the existing cert-controller informer.

Validation

  • Live AKS validation in an isolated temporary namespace: actual certificate Secret patch/update succeeded; actual unrelated Secret patch/update returned Forbidden. Authorization checks confirmed namespace-wide reads remain allowed and create/delete remain denied.

Scope

This reduces modification authority only. Namespace-wide Secret-content read exposure remains unresolved. Filtering informer requests upstream (open-policy-agent/cert-controller#590) is separate enabling work for a future read-RBAC restriction and is not required for this change.

Retain namespace-wide Secret reads for informer compatibility while limiting patch and update to the configured certificate Secret.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped permission change preserves required certificate access, with reported live validation and no unresolved findings.

No open issues 🎉

What changed in this PR

This PR narrows the Helm chart’s certificate Secret write permissions while preserving the reads needed by the certificate controller.

Changes:

  • Separates namespace-wide get/list/watch permissions from Secret write permissions.
  • Restricts patch/update to {{ .Values.name }}-webhook-cert.
  • Leaves namespace-wide Secret read exposure unchanged and explicitly out of scope.
File Description
charts/​latest/​templates/​certificate-rbac.yaml Splits Secret read and write rules, restricting writes to the configured certificate Secret.

Review effort: Balanced

@jmclong
jmclong (jmclong) merged commit fe7acd4 into Azure:main Oct 26, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants