More Info:
Enable Master Authorized Networks To Restrict Access To The ClusterS Control Plane (Master Endpoint) To Only An Allowlist (Whitelist) Of Authorized IpsRisk Level
MediumAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Gather current configuration (on any machine with gcloud access)
- If this returns
{}ornull, Master Authorized Networks (MAN) is effectively disabled. - If
"enabled": trueis present, review thecidrBlocksto ensure they match your intended allowlist.
- If this returns
-
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
kubectlor 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.
- Collect the public IPs or CIDR ranges for:
-
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/0or 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.
- Define explicit IPv4 CIDR ranges (e.g.
-
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, setmaster_authorized_networks_configwith the same CIDRs) and apply, ensuring it matches the gcloud change to avoid drift.
- If MAN is currently disabled or misconfigured, enable/update it (run on any machine with gcloud access):
-
Verify configuration and effective access (on any machine with gcloud and from test clients)
- Re-check the cluster configuration:
Confirm:
"enabled": true- The
cidrBlockslist 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.
- Re-check the cluster configuration:
-
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.
Using kubectl
Using kubectl
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.
Automation
Automation
-
MAN_Enabled = DISABLED(withHas_Authorized_Networks = NOorYES):
Master Authorized Networks is not effectively protecting the control plane; this fails the intent of CIS GKE 5.6.3. -
MAN_Enabled = ENABLEDandHas_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.
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.
