Information
Cluster Administrators should leverage groups in Google Workspace and Cloud IAM to assign Kubernetes user roles to a collection of users, instead of to individual emails using only Cloud IAM.
On- and off-boarding users is often difficult to automate and prone to error. Using a single source of truth for user permissions via groups in Google Workspace reduces the number of locations that an individual must be off-boarded from, and prevents users gaining unique permissions sets that increase the cost of audit.
NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.
Solution
Follow the groups in Google Workspace instructions at: Configure Google Groups for RBAC https://cloud.google.com/kubernetes-engine/docs/how-to/google-groups-rbac.
Command line statement to create a new cluster
gcloud container clusters create CLUSTER_NAME \\
--location=CONTROL_PLANE_LOCATION \\
--security-group="gke-security-groups@DOMAIN"
Command line statement to update an existing cluster
gcloud container clusters update CLUSTER_NAME \\
--location=CONTROL_PLANE_LOCATION \\
--security-group="gke-security-groups@DOMAIN"
In both create and update statements, replace the following:
- CLUSTER_NAME: the name of the new cluster.
- CONTROL_PLANE_LOCATION: the Compute Engine location of the control plane of your cluster. Provide a region for regional clusters, or a zone for zonal clusters.
- DOMAIN: the domain name of the gke-security-groups group you created.
NOTE: To run at the console, click on the following link and follow the numbered steps in the console tab: Enable Google Groups for RBAC on clusters https://cloud.google.com/kubernetes-engine/docs/how-to/google-groups-rbac#console
Finally create Roles, ClusterRoles, RoleBindings, and ClusterRoleBindings that reference the groups in Google Workspace.
Impact:
When migrating to using security groups, an audit of RoleBindings and ClusterRoleBindings is required to ensure all users of the cluster are managed using the new groups and not individually.
When managing RoleBindings and ClusterRoleBindings, be wary of inadvertently removing bindings required by service accounts.