Description of problem:
$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.11.20 True False 43h Cluster version is 4.11.20 $ oc get clusterrolebinding system:openshift:kube-controller-manager:gce-cloud-provider -o yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: creationTimestamp: "2023-01-11T13:16:47Z" name: system:openshift:kube-controller-manager:gce-cloud-provider resourceVersion: "6079" uid: 82a81635-4535-4a51-ab83-d2a1a5b9a473 roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: system:openshift:kube-controller-manager:gce-cloud-provider subjects: - kind: ServiceAccount name: cloud-provider namespace: kube-system $ oc get sa cloud-provider -n kube-system Error from server (NotFound): serviceaccounts "cloud-provider" not found The serviceAccount cloud-provider does not exist. Neither in kube-system nor in any other namespace. It's therefore not clear what this ClusterRoleBinding does, what use-case it does fulfill and why it references non existing serviceAccount. From Security point of view, it's recommended to remove non serviceAccounts from ClusterRoleBindings as a potential attacker could abuse the current state by creating the necessary serviceAccount and gain undesired permissions.
Version-Release number of selected component (if applicable):
OpenShift Container Platform 4 (all version from what we have found)
How reproducible:
Always
Steps to Reproduce:
1. Install OpenShift Container Platform 4 2. Run oc get clusterrolebinding system:openshift:kube-controller-manager:gce-cloud-provider -o yaml
Actual results:
$ oc get clusterrolebinding system:openshift:kube-controller-manager:gce-cloud-provider -o yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: creationTimestamp: "2023-01-11T13:16:47Z" name: system:openshift:kube-controller-manager:gce-cloud-provider resourceVersion: "6079" uid: 82a81635-4535-4a51-ab83-d2a1a5b9a473 roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: system:openshift:kube-controller-manager:gce-cloud-provider subjects: - kind: ServiceAccount name: cloud-provider namespace: kube-system $ oc get sa cloud-provider -n kube-system Error from server (NotFound): serviceaccounts "cloud-provider" not found
Expected results:
The serviceAccount called cloud-provider to exist or otherwise the ClusterRoleBinding to be removed.
Additional info:
Finding related to a Security review done on the OpenShift Container Platform 4 - Platform
- is related to
-
WRKLDS-954 Cleanup after legacy cloud-provider resources removal.
- To Do
- links to
-
RHEA-2024:0041 OpenShift Container Platform 4.16.z bug fix update