TMAegisBêta
Plus de règles pour gke

Google Kubernetes Engine (GKE)

TMA-GKE-5.8.3

Ensure Legacy Authorization (ABAC) is Disabled

CritiqueNiveau 1Automatiséegke

Description

Keep legacy ABAC authorization disabled for GKE clusters. ABAC is a legacy Kubernetes authorization method that has been superseded by Kubernetes RBAC, which provides fine grained authorization through Role, ClusterRole, RoleBinding, and ClusterRoleBinding resources. Requires gcloud with container.clusters.get; the cluster comes from GKE_CLUSTER and GKE_LOCATION (optional GKE_PROJECT, else the gcloud default project).

Méthode de vérification

Méthode d'audit: Commande shell

shell
v=$(gcloud container clusters describe "${GKE_CLUSTER:?set GKE_CLUSTER}" --location "${GKE_LOCATION:?set GKE_LOCATION}" ${GKE_PROJECT:+--project=$GKE_PROJECT} --format='value(legacyAbac.enabled)') || exit 1
if [ "$v" != True ]; then echo compliant; else echo "noncompliant: legacyAbac.enabled=$v"; fi
Sortie attendue
compliant

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

Disable legacy ABAC authorization for any GKE cluster where the audit result returns true. Before disabling ABAC, confirm that required users, groups, service accounts, workloads, and automation have the necessary Kubernetes RBAC permissions through Role, ClusterRole, RoleBinding, and ClusterRoleBinding resources. gcloud container clusters update $CLUSTER_NAME \ --location $LOCATION \ --project $PROJECT_ID \ --no-enable-legacy-authorization Rerun the audit command and confirm that .legacyAbac.enabled returns false or null. Validate representative access with kubectl auth can-i to confirm legitimate users and automation still have the required RBAC access.

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
gkemanaged-services
Référence
CIS Google Kubernetes Engine (GKE) Benchmark v2.0.0 - 5.8.3 Ensure Legacy Authorization (ABAC) is Disabled

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target gke