-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
- Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- If an issue is assigned to a user, that user is claiming responsibility for the issue.
- Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.
Description
GKE API reference has RBACBindingConfig defined to allow the users to restrict ClusterRoleBindings. This attribute supports enableInsecureBindingSystem(Un)authenticated - Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjects system:anonymous or system:unauthenticated.
The enableInsecureBindingSystemUnauthenticated is set to true by default in the API. This must be controlled by terraform to disable the unauthenticated binding. As this feature is currently not supported in terraform provider, it sets to true on API by default. Not desired configuration.
This is one of the security threat - TA0004.T1098.006 - Privilege Escalation - Account Manipulation: Additional Container Cluster Roles
GIVEN GKE Cluster
AND principal requests io.k8s.authorization.rbac.v1.rolebindings.create
AND one of the following conditions is true
response.metadata.kubectl.kubernetes.io/last-applied-configuration =
""kind":"Group","name":"system:unauthenticated""
response.metadata.kubectl.kubernetes.io/last-applied-configuration =
""kind":"Group","name":"system:anonymous""
WHEN request is successful
THEN Unauthenticated or anonymous kubectl client has permissions assigned
THEN TA0004.T1098.006 - Privilege Escalation - Account Manipulation: Additional Container Cluster Roles
New or Affected Resource(s)
google_container_clusters
Potential Terraform Configuration
rbac_binding_config{
## either one is desired, but not both
enable_insecure_binding_system_unauthenticated = bool #false/true
enable_insecure_binding_system_authenticated = bool #false/true
}
References
No response
b/417319811