Skip to main content

More Info:

Enable Master Authorized Networks To Restrict Access To The ClusterS Control Plane (Master Endpoint) To Only An Allowlist (Whitelist) Of Authorized Ips

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS GKE

Triage and Remediation

Remediation

Manual Steps

  1. Gather current configuration (on any machine with gcloud access)
    • If this returns {} or null, Master Authorized Networks (MAN) is effectively disabled.
    • If "enabled": true is present, review the cidrBlocks to ensure they match your intended allowlist.
  2. Inventory legitimate control‑plane access sources (off-cluster / documentation review)
    • Collect the public IPs or CIDR ranges for:
      • Corporate offices / VPN egress gateways.
      • CI/CD systems that run kubectl or use Kubernetes APIs.
      • Bastion/jump hosts used by administrators.
    • Decide whether direct access from arbitrary developer laptops or the public internet is required; in most cases it should not be.
  3. Decide on the desired allowlist and approve with stakeholders
    • Define explicit IPv4 CIDR ranges (e.g. 203.0.113.10/32, 198.51.100.0/24) that should have API access.
    • Remove any broad ranges such as 0.0.0.0/0 or consumer ISP ranges unless there is a strong, documented justification and compensating controls (e.g. strong VPN, short-lived clusters).
    • Ensure there is at least one path (VPN, bastion, or CI/CD) that operations can use for break‑glass access if needed.
  4. Configure Master Authorized Networks (change via gcloud; IaC users mirror in Terraform/other)
    • If MAN is currently disabled or misconfigured, enable/update it (run on any machine with gcloud access):
    • Replace <CIDR_1>,<CIDR_2>,<CIDR_3> with the approved list, e.g.:
    • If using Terraform or another IaC tool, make equivalent changes there (for Terraform google_container_cluster, set master_authorized_networks_config with the same CIDRs) and apply, ensuring it matches the gcloud change to avoid drift.
  5. Verify configuration and effective access (on any machine with gcloud and from test clients)
    • Re-check the cluster configuration:
      Confirm:
      • "enabled": true
      • The cidrBlocks list matches the approved IP ranges.
    • From a machine whose IP is not in the allowlist, attempt:
      It should fail with an API access/connection error.
    • From an allowed IP, the same command should succeed.
  6. Document and monitor
    • Record the approved CIDR list, justification, and date in your security/change management system.
    • Set up periodic review (e.g., quarterly) and update the allowlist as office/VPN/CI IPs change, repeating steps 1–5 for each review.
kubectl cannot enable or configure Master Authorized Networks because this setting is part of the managed control plane configuration in your cloud provider (GKE) rather than a Kubernetes API object. To remediate this finding, use the cloud provider console/CLI/IaC as described in the Manual Steps section.
Interpretation of the output (problem indicators):
  • MAN_Enabled = DISABLED (with Has_Authorized_Networks = NO or YES):
    Master Authorized Networks is not effectively protecting the control plane; this fails the intent of CIS GKE 5.6.3.
  • MAN_Enabled = ENABLED and Has_Authorized_Networks = BUT_NO_CIDRS:
    The feature is enabled but no CIDR blocks are configured; this is functionally insecure and should be reviewed as non-compliant.
Only rows with MAN_Enabled = ENABLED and Has_Authorized_Networks = YES and a tightly scoped Authorized_CIDRs list meet the control; the exact networks should be manually reviewed for appropriateness.

Additional Reading: