Skip to main content
compliance · gcp

GKE control planes reachable from any IP because authorized networks are off

resource types
1
rule IDs covered
1
severity
critical

What does ZopNight detect here?

GKE clusters are flagged at critical severity when `masterAuthorizedNetworksConfig` is disabled. The gcloud reference states that with authorized networks off, the public internet, `0.0.0.0/0`, may connect to the Kubernetes API server over HTTPS, so the control plane's only defence is authentication and any credential leak is immediately usable from anywhere.

Signal and threshold

How ZopNight evaluates GKE control planes reachable from any IP because authorized networks are off.
Field Value
Rule IDsRC-1223
Categorycompliance
Severitycritical
Metricnone — pure configuration read
Thresholdmaster authorized networks recorded as disabled
SourceZopNight
Permissions usedcontainer.clusters.list · container.clusters.get

An API server anyone can knock on

The Kubernetes API server is the most privileged component in a cluster. Authorized networks are an IP allowlist in front of it. Google’s network isolation overview describes them as an IP-based firewall for the GKE control plane, configured as a list of CIDR blocks. The gcloud reference spells out the alternative: with --no-enable-master-authorized-networks, the public internet (0.0.0.0/0) is allowed to connect to the control plane over HTTPS.

Authentication still applies, so an open endpoint is not an open cluster. But it means a leaked kubeconfig, a stolen service account key or an unpatched API server flaw can be exploited from any network on earth rather than only from your office or CI runners.

Checking the allowlist on each cluster

Terminal window
gcloud container clusters list \
--format="table(name,location,masterAuthorizedNetworksConfig.enabled)"
gcloud container clusters describe CLUSTER_NAME --location=LOCATION \
--format="yaml(masterAuthorizedNetworksConfig)"

The second command shows the CIDR blocks already allowed on a cluster that has the feature on.

How the finding is triggered

ZopNight records whether authorized networks are enabled for every GKE cluster it inventories, and fires only when the value is explicitly disabled. A cluster with no recorded value is skipped.

Clusters this does not cover

The rule checks that the allowlist exists, not what is in it. A cluster that has authorized networks on with a 0.0.0.0/0 entry is not flagged, so review the CIDR list yourself. Node exposure is a different question, handled by GKE Cluster Not Private.

Critical severity with no saving

No saving is attached. The fix is a configuration change; the real effort is collecting the right source ranges.

Restricting the control plane

  1. Collect the ranges that genuinely need API access: admin VPN egress, CI runners, bastion hosts.
  2. Enable the allowlist with those ranges:
    Terminal window
    gcloud container clusters update CLUSTER_NAME --location=LOCATION \
    --enable-master-authorized-networks \
    --master-authorized-networks=203.0.113.0/24,198.51.100.10/32
  3. Run gcloud container clusters get-credentials CLUSTER_NAME --location=LOCATION and a kubectl get nodes from an allowed network to confirm access.
  4. Consider the DNS-based endpoint or a private endpoint for stronger isolation.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·