Ensure Kubernetes Cluster is created with Client Certificate enabled

A client certificate is a base64-encoded public certificate used by clients to authenticate to the cluster endpoint.

Risk Level: High
Cloud Entity: Kubernetes Cluster
CloudGuard Rule ID: D9.GCP.IAM.08
Covered by Spectral: Yes
Category: Compute

GSL LOGIC

GkeCluster should have isClientCertificateIssued=true

REMEDIATION

Note:Remediation is only possible by creation of a new cluster with Client certificate enable.
From Portal

  1. Go to Kubernetes GCP Console by visiting https://console.cloud.google.com/kubernetes/list?
  2. Click on CREATE CLUSTER
  3. Choose required name/value for cluster fields
  4. Under 'CLUSTER' click on 'Security'
  5. Set 'Issue a client certificate' to Selected
  6. Click on Create

From TF
Set the 'issue_client_certificate' to be equal to 'true':

resource "google_container_cluster" "primary" {
	...
	master_auth {
		
		client_certificate_config {
			issue_client_certificate = true
		}
	}
	...
}

From Command Line
To add 'Issue a client certificate', run:

gcloud container clusters create YOUR_CLUSTER --machine-type=MACHINE_TYPE --issue-client-certificate --zone ZONE

References

  1. https://cloud.google.com/sdk/gcloud/reference/container/clusters/create
  2. https://registry.terraform.io/providers/hashicorp/google/3.14.0/docs/resources/container_cluster

Kubernetes Cluster

Kubernetes Engine is a managed, production-ready environment for deploying containerized applications. It brings our latest innovations in developer productivity, resource efficiency, automated operations, and open source flexibility to accelerate your time to market.

Launched in 2015, Kubernetes Engine builds on Google's experience of running services like Gmail and YouTube in containers for over 12 years. Kubernetes Engine allows you to get up and running with Kubernetes in no time, by completely eliminating the need to install, manage, and operate your own Kubernetes clusters.

Compliance Frameworks

  • CloudGuard GCP All Rules Ruleset
  • GCP CIS Foundations v. 1.0.0
  • GCP CloudGuard Best Practices
  • GCP MITRE ATT&CK Framework v12.1
  • GCP NIST 800-53 Rev 5