Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions pkg/render/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -999,14 +999,23 @@ func managerClusterRole(managedCluster bool, kubernetesProvider operatorv1.Provi
{
// ui-apis needs broad read access to UISettings and UISettingsGroups to serve
// requests on behalf of users. It performs SubjectAccessReviews to enforce
// per-group RBAC before returning results.
// per-group RBAC before returning results. Delete is included because the
// ui-apis DELETE handler issues the call with its own service-account token
// (writes were moved off user impersonation by the cloud security fix).
APIGroups: []string{"projectcalico.org"},
Resources: []string{
"uisettings",
"uisettingsgroups",
"uisettingsgroups/data",
},
Verbs: []string{"get", "list", "watch"},
Verbs: []string{"get", "list", "watch", "delete"},
},
{
// ClusterInformation read: surfaces the management-cluster version in the UI.
// Served by the ui-apis ClusterInformation handler using its own SA token.
APIGroups: []string{"projectcalico.org"},
Resources: []string{"clusterinformations"},
Verbs: []string{"get", "list"},
},
{
APIGroups: []string{"projectcalico.org"},
Expand All @@ -1030,11 +1039,14 @@ func managerClusterRole(managedCluster bool, kubernetesProvider operatorv1.Provi
},
Verbs: []string{"list"},
},
// Allow Enterprise Custom Dashboards to access managed clusters
// Allow Enterprise Custom Dashboards to access managed clusters. Create/delete
// were added when the ui-apis ManagedCluster handler took over CRUD with its
// own SA token (replacing the impersonated /apis/.../managedclusters proxy).
// Update is granted separately via managedClustersUpdateRBAC().
{
APIGroups: []string{"projectcalico.org"},
Resources: []string{"managedclusters"},
Verbs: []string{"get", "list", "watch"},
Verbs: []string{"get", "list", "watch", "create", "delete"},
},
{
APIGroups: []string{"projectcalico.org"},
Expand Down
18 changes: 14 additions & 4 deletions pkg/render/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,12 @@ var _ = Describe("Tigera Secure Manager rendering tests", func() {
"uisettingsgroups",
"uisettingsgroups/data",
},
Verbs: []string{"get", "list", "watch"},
Verbs: []string{"get", "list", "watch", "delete"},
},
{
APIGroups: []string{"projectcalico.org"},
Resources: []string{"clusterinformations"},
Verbs: []string{"get", "list"},
},
{
APIGroups: []string{"projectcalico.org"},
Expand All @@ -381,7 +386,7 @@ var _ = Describe("Tigera Secure Manager rendering tests", func() {
{
APIGroups: []string{"projectcalico.org"},
Resources: []string{"managedclusters"},
Verbs: []string{"get", "list", "watch"},
Verbs: []string{"get", "list", "watch", "create", "delete"},
},
{
APIGroups: []string{"projectcalico.org"},
Expand Down Expand Up @@ -684,7 +689,12 @@ var _ = Describe("Tigera Secure Manager rendering tests", func() {
"uisettingsgroups",
"uisettingsgroups/data",
},
Verbs: []string{"get", "list", "watch"},
Verbs: []string{"get", "list", "watch", "delete"},
},
{
APIGroups: []string{"projectcalico.org"},
Resources: []string{"clusterinformations"},
Verbs: []string{"get", "list"},
},
{
APIGroups: []string{"projectcalico.org"},
Expand All @@ -711,7 +721,7 @@ var _ = Describe("Tigera Secure Manager rendering tests", func() {
{
APIGroups: []string{"projectcalico.org"},
Resources: []string{"managedclusters"},
Verbs: []string{"get", "list", "watch"},
Verbs: []string{"get", "list", "watch", "create", "delete"},
},
{
APIGroups: []string{"projectcalico.org"},
Expand Down
Loading