diff --git a/pkg/render/apiserver.go b/pkg/render/apiserver.go index ffac9abaac..2e90a5dcfa 100644 --- a/pkg/render/apiserver.go +++ b/pkg/render/apiserver.go @@ -831,6 +831,14 @@ func (c *apiServerComponent) tigeraUserClusterRole() *rbacv1.ClusterRole { }, Verbs: []string{"get", "watch", "list"}, }, + // A POST to AuthenticationReviews can be compared with a POST to the TokenReviews endpoint. + // This api is added to circumvent a bug in the k8s-apiserver that is present in k8s + // versions up to v1.18 (kubernetes/pull/87612) when oidc audiences are enabled. + { + APIGroups: []string{"projectcalico.org"}, + Resources: []string{"authenticationreviews"}, + Verbs: []string{"create"}, + }, } // If this is a managed cluster the rule to access the clusters indices in Elasticsearch need to be added to the management @@ -942,6 +950,14 @@ func (c *apiServerComponent) tigeraNetworkAdminClusterRole() *rbacv1.ClusterRole }, Verbs: []string{"create", "update", "delete", "patch", "get", "watch", "list"}, }, + // A POST to AuthenticationReviews can be compared with a POST to the TokenReviews endpoint. + // This api is added to circumvent a bug in the k8s-apiserver that is present in k8s + // versions up to v1.18 (kubernetes/pull/87612) when oidc audiences are enabled. + { + APIGroups: []string{"projectcalico.org"}, + Resources: []string{"authenticationreviews"}, + Verbs: []string{"create"}, + }, } // If this is a managed cluster the rule to access the clusters indices in Elasticsearch need to be added to the management