Skip to main content

CIS Amazon Elastic Kubernetes Service (EKS) Benchmark

Overview

Center for Internet Security (CIS) provides set of best practices and security recommendations which is referred to as Elastic Kubernetes Service (EKS) Benchmark. These benchmarks are designed to strengthen the security posture of Amazon EKS clusters. Since the organizations are increasingly adopting the container orchestration platforms like EKS, it becomes essential to ensure that these environments are configured securely to mitigate security risks and protect sensitive data.

Purpose

The primary purposes of this benchmark are:

  1. Security Enhancement: The benchmark equips organizations with a set of well-defined security guidelines and best practices to proactively identify and address security vulnerabilities, misconfigurations, and potential threats within Amazon EKS clusters.

  2. Compliance Alignment: In a landscape with evolving compliance requirements, the benchmark enables organizations to align with industry and regulatory standards by providing clear and actionable security recommendations.

  3. Standardization: By offering universally recognized best practices, the benchmark encourages the adoption of standardized security procedures across Amazon EKS environments, ensuring consistency and uniformity in security configurations.

Importance

Securing Amazon EKS clusters is of paramount importance for several reasons:

  • Data Protection: EKS clusters often host critical applications and workloads that handle sensitive data. Insufficient security measures can lead to data breaches and loss.

  • Operational Continuity: Security incidents can disrupt operations and result in downtime, making a secure EKS environment crucial for maintaining business continuity.

  • Reputation and Trust: Security incidents can damage an organization's reputation and erode trust among customers and partners. The implementation of robust security measures is vital for preserving trust and integrity.

  • Legal and Regulatory Compliance: Many industries and jurisdictions have stringent data protection and security regulations. Non-compliance can lead to legal consequences and liabilities.

By adhering to the recommendations outlined in the CIS Amazon EKS Benchmark, organizations can significantly enhance the security of their Amazon EKS clusters, safeguard their assets, and mitigate potential security threats effectively.

How BOS targets CIS EKS Benchmarks v1.3.0

Benchmark IndexCIS Benchmark RecommendationBOS Env Template SupportsBOS Pipeline Template SupportsBOS DefaultComments
2.1Logging
2.1.1Enable audit LogsYesNoYesWe have enabled audit logs for the EKS Cluster.
3.1Worker Node Configuration Files
3.1.1Ensure that the kubeconfig file permissions are set to 644 or more restrictiveNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.1.2Ensure that the kubelet kubeconfig file ownership is set to root:rootNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.1.3Ensure that the kubelet configuration file has permissions set to 644 or more restrictiveNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.1.4Ensure that the kubelet configuration file ownership is set to root:rootNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2KubeletWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.1Ensure that the Anonymous Auth is Not EnabledNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.10Ensure that the RotateKubeletServerCertificate argument is set to trueNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.2Ensure that the --authorization-mode argument is not set to AlwaysAllowNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.3Ensure that a Client CA File is ConfiguredNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.4Ensure that the --read-only-port is disabledNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.5Ensure that the --streaming-connection-idle-timeout argument is not set to 0NANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.6Ensure that the --make-iptables-util-chains argument is set to trueNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.7Ensure that the --hostname-override argument is not setNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.8Ensure that the --eventRecordQPS argument is set to 0 or a level which ensures appropriate event captureNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.2.9Ensure that the --rotate-certificates argument is not present or is set to trueNANAYesWe are making use of managed EKS Cluster. The worker nodes are auto created by EKS with default configs. These controls are satisfied in the worker nodes. The worker nodes are running with the AMI AL2_x86_64
3.3Container Optimized OS
3.3.1Prefer using a container-optimized OS when possibleYesNoYesWe are making use of recommended AL2_x86_64 AMI
4.1RBAC and Service Accounts
4.1.1Ensure that the cluster-admin role is only used where requiredNoYesYesWe are not making use of any additional Kubernetes Roles or Cluster Roles apart from default
4.1.2Minimize access to secretsNoYesYesNo explicit access to secrets is given.
4.1.3Minimize wildcard use in Roles and ClusterRolesNoYesYesNo Wildcards are being used.
4.1.4Minimize access to create podsNoYesYesNo explicit access to given to create pods. Pods cannot be created without authentication
4.1.5Ensure that default service accounts are not actively used.NoNANAWe are making use of AWS Roles to authenticate with API server. and deploy containers
4.1.6Ensure that Service Account Tokens are only mounted where necessaryNoNANAWe are making use of AWS Roles to authenticate with API server. and deploy containers
4.1.7Avoid use of system:masters groupNoNoYesWe are not making use of system:masters group
4.1.8Limit use of the Bind, Impersonate and Escalate permissions in the Kubernetes clusterNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2Pod Security StandardsWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.1Minimize the admission of privileged containersNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.2Minimize the admission of containers wishing to share the host process ID namespaceNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.3Minimize the admission of containers wishing to share the host IPC namespaceNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.4Minimize the admission of containers wishing to share the host network namespaceNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.5Minimize the admission of containers with allowPrivilegeEscalationNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.6Minimize the admission of root containersNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.7Minimize the admission of containers with added capabilitiesNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.2.8Minimize the admission of containers with capabilities assignedNoYesYesWe are making use of securityContext in our pipeline template, we are defining the privilege permission, PrivilegeEscalation, root permissions, capabilities for each pods and container in a given namespace
4.3CNI Plugin
4.3.1Ensure CNI plugin supports network policies.YesNoYesWe are making use of Amazon VPC CNI
4.3.2Ensure that all Namespaces have Network Policies definedNoYesYesOur Pipeline template creates network policies for each namespace
4.4Secrets Management
4.4.1Prefer using secrets as files over secrets as environment variablesNANANASecret Management with amazon secret manager will be used.
4.4.2Consider external secret storageNANANASecret Management with amazon secret manager will be used.
4.5General Policies
4.5.1Create administrative boundaries between resources using namespacesNoYesYesWe are making use of different namespaces for each application
4.5.2Apply Security Context to Your Pods and ContainersNoYesYesWe are making use of security context in our Pipeline Template
4.5.3The default namespace should not be usedNoYesYesWe are not making use of Default Namespace for any deployment
5.1Image Registry and Image Scanning
5.1.1Ensure Image Vulnerability Scanning using Amazon ECR image scanning or a third party providerYesNoYesWe have enabled image scanning in ECR
5.1.2Minimize user access to Amazon ECRYesNoYesECR cannot be accessed with a valid role
5.1.3Minimize cluster access to read-only for Amazon ECRYesNoYesEKS has only read access to ECR
5.1.4Minimize Container Registries to only those approvedYesNoYesEKS only runs applications whose images are hosted in ECR
5.2Identity and Access Management (IAM)
5.2.1Prefer using dedicated EKS Service AccountsNANANAWe are making use of AWS Roles to authenticate with API server. and deploy containers
5.3AWS EKS Key Management Service
5.3.1Ensure Kubernetes Secrets are encrypted using Customer Master Keys (CMKs) managed in AWS KMSYesNoYesSecret encryption is on with CMK in KMS
5.4Cluster Networking
5.4.1Restrict Access to the Control Plane EndpointYesNoNoConfigurable with ENV Template parameters
5.4.2Ensure clusters are created with Private Endpoint Enabled and Public Access DisabledYesNoNoConfigurable with ENV Template parameters
5.4.3Ensure clusters are created with Private NodesYesNoYesNodes only have private IPs
5.4.4Ensure Network Policy is Enabled and set as appropriateYesNoYesWe are enabling the Network Policy on the EKS level as well as on the namespace level.
5.4.5Encrypt traffic to HTTPS load balancers with TLS certificatesNoYesYesWe are making use of certs for HTTPs
5.5Authentication and Authorization
5.5.1Manage Kubernetes RBAC users with AWS IAM Authenticator for Kubernetes or Upgrade to AWS CLI v1.16.156 or greaterYesNoYesWe are making use of AWS Roles to authenticate with API server. and deploy containers
5.6Other Cluster Configurations
5.6.1Consider Fargate for running untrusted workloadsYesNoNoNot applied in default config to limit cost