Skip to content

Add RBAC for the new ui-apis ManagedCluster / ClusterInformation handlers#4798

Open
Brian-McM wants to merge 1 commit into
tigera:masterfrom
Brian-McM:bm-manager-rbac-for-ui-apis-handlers
Open

Add RBAC for the new ui-apis ManagedCluster / ClusterInformation handlers#4798
Brian-McM wants to merge 1 commit into
tigera:masterfrom
Brian-McM:bm-manager-rbac-for-ui-apis-handlers

Conversation

@Brian-McM
Copy link
Copy Markdown
Contributor

Description

The cloud security fix in calico-private (PR #11546) moves UISettings delete, ManagedCluster CRUD, and ClusterInformation reads off the user-impersonated /apis/projectcalico.org/v3 proxy path and onto ui-apis handlers that call the Calico API with their own service-account token. The tigera-manager pod SA therefore needs new grants on these resources.

Changes to managerClusterRole (pkg/render/manager.go):

  • uisettings / uisettingsgroups / uisettingsgroups/data — add "delete" (previously only get/list/watch).
  • managedclusters — add "create" and "delete" verbs (previously only get/list/watch). "update" continues to live in managedClustersUpdateRBAC().
  • clusterinformations — new rule with "get" and "list" so the UI can surface the management cluster version through ui-apis.

manager_test.go updated at both assertion sites to match.

Release Note

TBD

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

…lers

The cloud security fix in calico-private (PR #11546) moves UISettings delete,
ManagedCluster CRUD, and ClusterInformation reads off the user-impersonated
/apis/projectcalico.org/v3 proxy path and onto ui-apis handlers that call the
Calico API with their own service-account token. The tigera-manager pod SA
therefore needs new grants on these resources.

Changes to managerClusterRole (pkg/render/manager.go):
- uisettings / uisettingsgroups / uisettingsgroups/data — add "delete"
  (previously only get/list/watch).
- managedclusters — add "create" and "delete" verbs (previously only
  get/list/watch). "update" continues to live in managedClustersUpdateRBAC().
- clusterinformations — new rule with "get" and "list" so the UI can surface
  the management cluster version through ui-apis.

manager_test.go updated at both assertion sites to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants