Back to controls

Ensure Basic Authentication is disabled on Kubernetes Engine Clusters

Basic authentication uses a static username and password to access the Kubernetes API server. In GKE this method is deprecated and has been removed in newer versions, because static credentials are harder to rotate, audit, and protect than IAM-based access.

Category

Controls

High

Applies to

Google Cloud

Coverage

1 queries

Asset types

1 covered

Overview

Basic authentication uses a static username and password to access the Kubernetes API server. In GKE this method is deprecated and has been removed in newer versions, because static credentials are harder to rotate, audit, and protect than IAM-based access.

Rationale

If a cluster still exposes basic authentication, an attacker only needs those static credentials to attempt access. Modern GKE administration should use IAM and short-lived credentials instead of long-lived usernames and passwords.

Remediation guidance

Using Command Line

For older clusters where basic authentication still exists, disable it:

gcloud container clusters update [CLUSTER_NAME]   --location [LOCATION]   --no-enable-basic-auth

Validate that static basic-auth credentials are no longer configured:

gcloud container clusters describe [CLUSTER_NAME]   --location [LOCATION]   --format='yaml(masterAuth)'

Better platform fix

Prefer the DNS-based control plane endpoint with IAM-based access for administrators. This removes the operational need for static Kubernetes API credentials.

Impact

Any automation or administrators still using static username/password credentials will stop working. Migrate them to IAM-backed access before the change.

Notes

Google documents basic authentication as deprecated and removed in GKE 1.19 and later. If this control still fires, treat it as a legacy cluster hygiene issue that should be remediated quickly.

References

  1. https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication

Service-wide remediation

Recommended when many resources are affected: remove static API credentials from the cluster operating model entirely and standardize on IAM-backed administration.

Update cluster templates and administrator runbooks so new clusters never rely on basic authentication.

Operational rollout

  1. Identify every user or script that still uses static cluster credentials.
  2. Migrate those paths to IAM-backed access.
  3. Disable basic authentication and re-scan the environment.

Query logic

These are the stored checks tied to this control.

Basic Authentication is disabled on Kubernetes Engine Clusters

Connectors

Google Cloud

Covered asset types

Cluster

Expected check: eq []

{gkeClusters(where:{OR:[{masterAuthUsername_NOT:"" masterAuthPassword_NOT:""}]}){...AssetFragment}}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon