mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-10-11 12:26:04 +00:00
1 line
291 KiB
JavaScript
1 line
291 KiB
JavaScript
"use strict";(self.webpackChunkrancher_docs=self.webpackChunkrancher_docs||[]).push([[58635],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>k});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},s=Object.keys(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),u=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,s=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=u(r),k=n,m=d["".concat(l,".").concat(k)]||d[k]||p[k]||s;return r?a.createElement(m,i(i({ref:t},c),{},{components:r})):a.createElement(m,i({ref:t},c))}));function k(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=r.length,i=new Array(s);i[0]=d;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var u=2;u<s;u++)i[u]=r[u];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}d.displayName="MDXCreateElement"},75176:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>u});var a=r(87462),n=(r(67294),r(3905));const s={title:"RKE Self-Assessment Guide - CIS Benchmark v1.23 - K8s v1.23"},i=void 0,o={unversionedId:"reference-guides/rancher-security/hardening-guides/rke1-hardening-guide/rke1-self-assessment-guide-with-cis-v1.23-k8s-v1.23",id:"reference-guides/rancher-security/hardening-guides/rke1-hardening-guide/rke1-self-assessment-guide-with-cis-v1.23-k8s-v1.23",title:"RKE Self-Assessment Guide - CIS Benchmark v1.23 - K8s v1.23",description:"This document is a companion to the RKE Hardening Guide, which provides prescriptive guidance on how to harden RKE clusters that are running in production and managed by Rancher. This benchmark guide helps you evaluate the security of a hardened cluster against each control in the CIS Kubernetes Benchmark.",source:"@site/docs/reference-guides/rancher-security/hardening-guides/rke1-hardening-guide/rke1-self-assessment-guide-with-cis-v1.23-k8s-v1.23.md",sourceDirName:"reference-guides/rancher-security/hardening-guides/rke1-hardening-guide",slug:"/reference-guides/rancher-security/hardening-guides/rke1-hardening-guide/rke1-self-assessment-guide-with-cis-v1.23-k8s-v1.23",permalink:"/reference-guides/rancher-security/hardening-guides/rke1-hardening-guide/rke1-self-assessment-guide-with-cis-v1.23-k8s-v1.23",draft:!1,editUrl:"https://github.com/rancher/rancher-docs/edit/main/docs/reference-guides/rancher-security/hardening-guides/rke1-hardening-guide/rke1-self-assessment-guide-with-cis-v1.23-k8s-v1.23.md",tags:[],version:"current",lastUpdatedAt:1678300966,formattedLastUpdatedAt:"Mar 8, 2023",frontMatter:{title:"RKE Self-Assessment Guide - CIS Benchmark v1.23 - K8s v1.23"},sidebar:"tutorialSidebar",previous:{title:"RKE Hardening Guide",permalink:"/pages-for-subheaders/rke1-hardening-guide"},next:{title:"RKE Self-Assessment Guide - CIS Benchmark v1.23 - K8s v1.24",permalink:"/reference-guides/rancher-security/hardening-guides/rke1-hardening-guide/rke1-self-assessment-guide-with-cis-v1.23-k8s-v1.24"}},l={},u=[{value:"Testing Methodology",id:"testing-methodology",level:2},{value:"Controls",id:"controls",level:3},{value:"1.1 Master Node Configuration Files",id:"11-master-node-configuration-files",level:2},{value:"1.1.1 Ensure that the API server pod specification file permissions are set to 644 or more restrictive (Automated)",id:"111-ensure-that-the-api-server-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.2 Ensure that the API server pod specification file ownership is set to root:root (Automated)",id:"112-ensure-that-the-api-server-pod-specification-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.3 Ensure that the controller manager pod specification file permissions are set to 644 or more restrictive (Automated)",id:"113-ensure-that-the-controller-manager-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.4 Ensure that the controller manager pod specification file ownership is set to root:root (Automated)",id:"114-ensure-that-the-controller-manager-pod-specification-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.5 Ensure that the scheduler pod specification file permissions are set to 644 or more restrictive (Automated)",id:"115-ensure-that-the-scheduler-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.6 Ensure that the scheduler pod specification file ownership is set to root:root (Automated)",id:"116-ensure-that-the-scheduler-pod-specification-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.7 Ensure that the etcd pod specification file permissions are set to 644 or more restrictive (Automated)",id:"117-ensure-that-the-etcd-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.8 Ensure that the etcd pod specification file ownership is set to root:root (Automated)",id:"118-ensure-that-the-etcd-pod-specification-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.9 Ensure that the Container Network Interface file permissions are set to 644 or more restrictive (Automated)",id:"119-ensure-that-the-container-network-interface-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.10 Ensure that the Container Network Interface file ownership is set to root:root (Automated)",id:"1110-ensure-that-the-container-network-interface-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.11 Ensure that the etcd data directory permissions are set to 700 or more restrictive (Automated)",id:"1111-ensure-that-the-etcd-data-directory-permissions-are-set-to-700-or-more-restrictive-automated",level:3},{value:"1.1.12 Ensure that the etcd data directory ownership is set to etcd:etcd (Automated)",id:"1112-ensure-that-the-etcd-data-directory-ownership-is-set-to-etcdetcd-automated",level:3},{value:"1.1.13 Ensure that the admin.conf file permissions are set to 600 or more restrictive (Automated)",id:"1113-ensure-that-the-adminconf-file-permissions-are-set-to-600-or-more-restrictive-automated",level:3},{value:"1.1.14 Ensure that the admin.conf file ownership is set to root:root (Automated)",id:"1114-ensure-that-the-adminconf-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.15 Ensure that the scheduler.conf file permissions are set to 644 or more restrictive (Automated)",id:"1115-ensure-that-the-schedulerconf-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.16 Ensure that the scheduler.conf file ownership is set to root:root (Automated)",id:"1116-ensure-that-the-schedulerconf-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.17 Ensure that the controller-manager.conf file permissions are set to 644 or more restrictive (Automated)",id:"1117-ensure-that-the-controller-managerconf-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.18 Ensure that the controller-manager.conf file ownership is set to root:root (Automated)",id:"1118-ensure-that-the-controller-managerconf-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.19 Ensure that the Kubernetes PKI directory and file ownership is set to root:root (Automated)",id:"1119-ensure-that-the-kubernetes-pki-directory-and-file-ownership-is-set-to-rootroot-automated",level:3},{value:"1.1.20 Ensure that the Kubernetes PKI certificate file permissions are set to 644 or more restrictive (Automated)",id:"1120-ensure-that-the-kubernetes-pki-certificate-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"1.1.21 Ensure that the Kubernetes PKI key file permissions are set to 600 (Automated)",id:"1121-ensure-that-the-kubernetes-pki-key-file-permissions-are-set-to-600-automated",level:3},{value:"1.2 API Server",id:"12-api-server",level:2},{value:"1.2.1 Ensure that the --anonymous-auth argument is set to false (Automated)",id:"121-ensure-that-the---anonymous-auth-argument-is-set-to-false-automated",level:3},{value:"1.2.2 Ensure that the --token-auth-file parameter is not set (Automated)",id:"122-ensure-that-the---token-auth-file-parameter-is-not-set-automated",level:3},{value:"1.2.3 Ensure that the --DenyServiceExternalIPs is not set (Automated)",id:"123-ensure-that-the---denyserviceexternalips-is-not-set-automated",level:3},{value:"1.2.4 Ensure that the --kubelet-https argument is set to true (Automated)",id:"124-ensure-that-the---kubelet-https-argument-is-set-to-true-automated",level:3},{value:"1.2.5 Ensure that the --kubelet-client-certificate and --kubelet-client-key arguments are set as appropriate (Automated)",id:"125-ensure-that-the---kubelet-client-certificate-and---kubelet-client-key-arguments-are-set-as-appropriate-automated",level:3},{value:"1.2.6 Ensure that the --kubelet-certificate-authority argument is set as appropriate (Automated)",id:"126-ensure-that-the---kubelet-certificate-authority-argument-is-set-as-appropriate-automated",level:3},{value:"1.2.7 Ensure that the --authorization-mode argument is not set to AlwaysAllow (Automated)",id:"127-ensure-that-the---authorization-mode-argument-is-not-set-to-alwaysallow-automated",level:3},{value:"1.2.8 Ensure that the --authorization-mode argument includes Node (Automated)",id:"128-ensure-that-the---authorization-mode-argument-includes-node-automated",level:3},{value:"1.2.9 Ensure that the --authorization-mode argument includes RBAC (Automated)",id:"129-ensure-that-the---authorization-mode-argument-includes-rbac-automated",level:3},{value:"1.2.10 Ensure that the admission control plugin EventRateLimit is set (Manual)",id:"1210-ensure-that-the-admission-control-plugin-eventratelimit-is-set-manual",level:3},{value:"1.2.11 Ensure that the admission control plugin AlwaysAdmit is not set (Automated)",id:"1211-ensure-that-the-admission-control-plugin-alwaysadmit-is-not-set-automated",level:3},{value:"1.2.12 Ensure that the admission control plugin AlwaysPullImages is set (Manual)",id:"1212-ensure-that-the-admission-control-plugin-alwayspullimages-is-set-manual",level:3},{value:"1.2.13 Ensure that the admission control plugin SecurityContextDeny is set if PodSecurityPolicy is not used (Manual)",id:"1213-ensure-that-the-admission-control-plugin-securitycontextdeny-is-set-if-podsecuritypolicy-is-not-used-manual",level:3},{value:"1.2.14 Ensure that the admission control plugin ServiceAccount is set (Automated)",id:"1214-ensure-that-the-admission-control-plugin-serviceaccount-is-set-automated",level:3},{value:"1.2.15 Ensure that the admission control plugin NamespaceLifecycle is set (Automated)",id:"1215-ensure-that-the-admission-control-plugin-namespacelifecycle-is-set-automated",level:3},{value:"1.2.16 Ensure that the admission control plugin NodeRestriction is set (Automated)",id:"1216-ensure-that-the-admission-control-plugin-noderestriction-is-set-automated",level:3},{value:"1.2.17 Ensure that the --secure-port argument is not set to 0 (Automated)",id:"1217-ensure-that-the---secure-port-argument-is-not-set-to-0-automated",level:3},{value:"1.2.18 Ensure that the --profiling argument is set to false (Automated)",id:"1218-ensure-that-the---profiling-argument-is-set-to-false-automated",level:3},{value:"1.2.19 Ensure that the --audit-log-path argument is set (Automated)",id:"1219-ensure-that-the---audit-log-path-argument-is-set-automated",level:3},{value:"1.2.20 Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Automated)",id:"1220-ensure-that-the---audit-log-maxage-argument-is-set-to-30-or-as-appropriate-automated",level:3},{value:"1.2.21 Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Automated)",id:"1221-ensure-that-the---audit-log-maxbackup-argument-is-set-to-10-or-as-appropriate-automated",level:3},{value:"1.2.22 Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Automated)",id:"1222-ensure-that-the---audit-log-maxsize-argument-is-set-to-100-or-as-appropriate-automated",level:3},{value:"1.2.24 Ensure that the --service-account-lookup argument is set to true (Automated)",id:"1224-ensure-that-the---service-account-lookup-argument-is-set-to-true-automated",level:3},{value:"1.2.25 Ensure that the --request-timeout argument is set as appropriate (Automated)",id:"1225-ensure-that-the---request-timeout-argument-is-set-as-appropriate-automated",level:3},{value:"1.2.26 Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Automated)",id:"1226-ensure-that-the---etcd-certfile-and---etcd-keyfile-arguments-are-set-as-appropriate-automated",level:3},{value:"1.2.27 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Automated)",id:"1227-ensure-that-the---tls-cert-file-and---tls-private-key-file-arguments-are-set-as-appropriate-automated",level:3},{value:"1.2.28 Ensure that the --client-ca-file argument is set as appropriate (Automated)",id:"1228-ensure-that-the---client-ca-file-argument-is-set-as-appropriate-automated",level:3},{value:"1.2.29 Ensure that the --etcd-cafile argument is set as appropriate (Automated)",id:"1229-ensure-that-the---etcd-cafile-argument-is-set-as-appropriate-automated",level:3},{value:"1.2.30 Ensure that the --encryption-provider-config argument is set as appropriate (Manual)",id:"1230-ensure-that-the---encryption-provider-config-argument-is-set-as-appropriate-manual",level:3},{value:"1.2.31 Ensure that encryption providers are appropriately configured (Automated)",id:"1231-ensure-that-encryption-providers-are-appropriately-configured-automated",level:3},{value:"1.2.32 Ensure that the API Server only makes use of Strong Cryptographic Ciphers (Automated)",id:"1232-ensure-that-the-api-server-only-makes-use-of-strong-cryptographic-ciphers-automated",level:3},{value:"1.3 Controller Manager",id:"13-controller-manager",level:2},{value:"1.3.1 Ensure that the --terminated-pod-gc-threshold argument is set as appropriate (Automated)",id:"131-ensure-that-the---terminated-pod-gc-threshold-argument-is-set-as-appropriate-automated",level:3},{value:"1.3.2 Ensure that the --profiling argument is set to false (Automated)",id:"132-ensure-that-the---profiling-argument-is-set-to-false-automated",level:3},{value:"1.3.3 Ensure that the --use-service-account-credentials argument is set to true (Automated)",id:"133-ensure-that-the---use-service-account-credentials-argument-is-set-to-true-automated",level:3},{value:"1.3.4 Ensure that the --service-account-private-key-file argument is set as appropriate (Automated)",id:"134-ensure-that-the---service-account-private-key-file-argument-is-set-as-appropriate-automated",level:3},{value:"1.3.5 Ensure that the --root-ca-file argument is set as appropriate (Automated)",id:"135-ensure-that-the---root-ca-file-argument-is-set-as-appropriate-automated",level:3},{value:"1.3.6 Ensure that the RotateKubeletServerCertificate argument is set to true (Automated)",id:"136-ensure-that-the-rotatekubeletservercertificate-argument-is-set-to-true-automated",level:3},{value:"1.3.7 Ensure that the --bind-address argument is set to 127.0.0.1 (Automated)",id:"137-ensure-that-the---bind-address-argument-is-set-to-127001-automated",level:3},{value:"1.4 Scheduler",id:"14-scheduler",level:2},{value:"1.4.1 Ensure that the --profiling argument is set to false (Automated)",id:"141-ensure-that-the---profiling-argument-is-set-to-false-automated",level:3},{value:"1.4.2 Ensure that the --bind-address argument is set to 127.0.0.1 (Automated)",id:"142-ensure-that-the---bind-address-argument-is-set-to-127001-automated",level:3},{value:"2 Etcd Node Configuration",id:"2-etcd-node-configuration",level:2},{value:"2.1 Ensure that the --cert-file and --key-file arguments are set as appropriate (Automated)",id:"21-ensure-that-the---cert-file-and---key-file-arguments-are-set-as-appropriate-automated",level:3},{value:"2.2 Ensure that the --client-cert-auth argument is set to true (Automated)",id:"22-ensure-that-the---client-cert-auth-argument-is-set-to-true-automated",level:3},{value:"2.3 Ensure that the --auto-tls argument is not set to true (Automated)",id:"23-ensure-that-the---auto-tls-argument-is-not-set-to-true-automated",level:3},{value:"2.4 Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate (Automated)",id:"24-ensure-that-the---peer-cert-file-and---peer-key-file-arguments-are-set-as-appropriate-automated",level:3},{value:"2.5 Ensure that the --peer-client-cert-auth argument is set to true (Automated)",id:"25-ensure-that-the---peer-client-cert-auth-argument-is-set-to-true-automated",level:3},{value:"2.6 Ensure that the --peer-auto-tls argument is not set to true (Automated)",id:"26-ensure-that-the---peer-auto-tls-argument-is-not-set-to-true-automated",level:3},{value:"2.7 Ensure that a unique Certificate Authority is used for etcd (Automated)",id:"27-ensure-that-a-unique-certificate-authority-is-used-for-etcd-automated",level:3},{value:"3.1 Authentication and Authorization",id:"31-authentication-and-authorization",level:2},{value:"3.1.1 Client certificate authentication should not be used for users (Manual)",id:"311-client-certificate-authentication-should-not-be-used-for-users-manual",level:3},{value:"3.2 Logging",id:"32-logging",level:2},{value:"3.2.1 Ensure that a minimal audit policy is created (Automated)",id:"321-ensure-that-a-minimal-audit-policy-is-created-automated",level:3},{value:"3.2.2 Ensure that the audit policy covers key security concerns (Manual)",id:"322-ensure-that-the-audit-policy-covers-key-security-concerns-manual",level:3},{value:"4.1 Worker Node Configuration Files",id:"41-worker-node-configuration-files",level:2},{value:"4.1.1 Ensure that the kubelet service file permissions are set to 644 or more restrictive (Automated)",id:"411-ensure-that-the-kubelet-service-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"4.1.2 Ensure that the kubelet service file ownership is set to root:root (Automated)",id:"412-ensure-that-the-kubelet-service-file-ownership-is-set-to-rootroot-automated",level:3},{value:"4.1.3 If proxy kubeconfig file exists ensure permissions are set to 644 or more restrictive (Automated)",id:"413-if-proxy-kubeconfig-file-exists-ensure-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"4.1.4 If proxy kubeconfig file exists ensure ownership is set to root:root (Automated)",id:"414-if-proxy-kubeconfig-file-exists-ensure-ownership-is-set-to-rootroot-automated",level:3},{value:"4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions are set to 644 or more restrictive (Automated)",id:"415-ensure-that-the---kubeconfig-kubeletconf-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"4.1.6 Ensure that the --kubeconfig kubelet.conf file ownership is set to root:root (Automated)",id:"416-ensure-that-the---kubeconfig-kubeletconf-file-ownership-is-set-to-rootroot-automated",level:3},{value:"4.1.7 Ensure that the certificate authorities file permissions are set to 644 or more restrictive (Automated)",id:"417-ensure-that-the-certificate-authorities-file-permissions-are-set-to-644-or-more-restrictive-automated",level:3},{value:"4.1.8 Ensure that the client certificate authorities file ownership is set to root:root (Automated)",id:"418-ensure-that-the-client-certificate-authorities-file-ownership-is-set-to-rootroot-automated",level:3},{value:"4.1.9 Ensure that the kubelet --config configuration file has permissions set to 644 or more restrictive (Automated)",id:"419-ensure-that-the-kubelet---config-configuration-file-has-permissions-set-to-644-or-more-restrictive-automated",level:3},{value:"4.1.10 Ensure that the kubelet --config configuration file ownership is set to root:root (Automated)",id:"4110-ensure-that-the-kubelet---config-configuration-file-ownership-is-set-to-rootroot-automated",level:3},{value:"4.2 Kubelet",id:"42-kubelet",level:2},{value:"4.2.1 Ensure that the --anonymous-auth argument is set to false (Automated)",id:"421-ensure-that-the---anonymous-auth-argument-is-set-to-false-automated",level:3},{value:"4.2.2 Ensure that the --authorization-mode argument is not set to AlwaysAllow (Automated)",id:"422-ensure-that-the---authorization-mode-argument-is-not-set-to-alwaysallow-automated",level:3},{value:"4.2.3 Ensure that the --client-ca-file argument is set as appropriate (Automated)",id:"423-ensure-that-the---client-ca-file-argument-is-set-as-appropriate-automated",level:3},{value:"4.2.4 Ensure that the --read-only-port argument is set to 0 (Automated)",id:"424-ensure-that-the---read-only-port-argument-is-set-to-0-automated",level:3},{value:"4.2.5 Ensure that the --streaming-connection-idle-timeout argument is not set to 0 (Manual)",id:"425-ensure-that-the---streaming-connection-idle-timeout-argument-is-not-set-to-0-manual",level:3},{value:"4.2.6 Ensure that the --protect-kernel-defaults argument is set to true (Automated)",id:"426-ensure-that-the---protect-kernel-defaults-argument-is-set-to-true-automated",level:3},{value:"4.2.7 Ensure that the --make-iptables-util-chains argument is set to true (Automated)",id:"427-ensure-that-the---make-iptables-util-chains-argument-is-set-to-true-automated",level:3},{value:"4.2.8 Ensure that the --hostname-override argument is not set (Manual)",id:"428-ensure-that-the---hostname-override-argument-is-not-set-manual",level:3},{value:"4.2.9 Ensure that the --event-qps argument is set to 0 or a level which ensures appropriate event capture (Manual)",id:"429-ensure-that-the---event-qps-argument-is-set-to-0-or-a-level-which-ensures-appropriate-event-capture-manual",level:3},{value:"4.2.10 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Automated)",id:"4210-ensure-that-the---tls-cert-file-and---tls-private-key-file-arguments-are-set-as-appropriate-automated",level:3},{value:"4.2.11 Ensure that the --rotate-certificates argument is not set to false (Automated)",id:"4211-ensure-that-the---rotate-certificates-argument-is-not-set-to-false-automated",level:3},{value:"4.2.12 Verify that the RotateKubeletServerCertificate argument is set to true (Automated)",id:"4212-verify-that-the-rotatekubeletservercertificate-argument-is-set-to-true-automated",level:3},{value:"4.2.13 Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers (Automated)",id:"4213-ensure-that-the-kubelet-only-makes-use-of-strong-cryptographic-ciphers-automated",level:3},{value:"5.1 RBAC and Service Accounts",id:"51-rbac-and-service-accounts",level:2},{value:"5.1.1 Ensure that the cluster-admin role is only used where required (Manual)",id:"511-ensure-that-the-cluster-admin-role-is-only-used-where-required-manual",level:3},{value:"5.1.2 Minimize access to secrets (Manual)",id:"512-minimize-access-to-secrets-manual",level:3},{value:"5.1.3 Minimize wildcard use in Roles and ClusterRoles (Manual)",id:"513-minimize-wildcard-use-in-roles-and-clusterroles-manual",level:3},{value:"5.1.4 Minimize access to create pods (Manual)",id:"514-minimize-access-to-create-pods-manual",level:3},{value:"5.1.5 Ensure that default service accounts are not actively used. (Automated)",id:"515-ensure-that-default-service-accounts-are-not-actively-used-automated",level:3},{value:"5.1.6 Ensure that Service Account Tokens are only mounted where necessary (Manual)",id:"516-ensure-that-service-account-tokens-are-only-mounted-where-necessary-manual",level:3},{value:"5.1.7 Avoid use of system:masters group (Manual)",id:"517-avoid-use-of-systemmasters-group-manual",level:3},{value:"5.1.8 Limit use of the Bind, Impersonate and Escalate permissions in the Kubernetes cluster (Manual)",id:"518-limit-use-of-the-bind-impersonate-and-escalate-permissions-in-the-kubernetes-cluster-manual",level:3},{value:"5.2 Pod Security Standards",id:"52-pod-security-standards",level:2},{value:"5.2.1 Ensure that the cluster has at least one active policy control mechanism in place (Manual)",id:"521-ensure-that-the-cluster-has-at-least-one-active-policy-control-mechanism-in-place-manual",level:3},{value:"5.2.2 Minimize the admission of privileged containers (Manual)",id:"522-minimize-the-admission-of-privileged-containers-manual",level:3},{value:"5.2.3 Minimize the admission of containers wishing to share the host process ID namespace (Automated)",id:"523-minimize-the-admission-of-containers-wishing-to-share-the-host-process-id-namespace-automated",level:3},{value:"5.2.4 Minimize the admission of containers wishing to share the host IPC namespace (Automated)",id:"524-minimize-the-admission-of-containers-wishing-to-share-the-host-ipc-namespace-automated",level:3},{value:"5.2.5 Minimize the admission of containers wishing to share the host network namespace (Automated)",id:"525-minimize-the-admission-of-containers-wishing-to-share-the-host-network-namespace-automated",level:3},{value:"5.2.6 Minimize the admission of containers with allowPrivilegeEscalation (Automated)",id:"526-minimize-the-admission-of-containers-with-allowprivilegeescalation-automated",level:3},{value:"5.2.7 Minimize the admission of root containers (Automated)",id:"527-minimize-the-admission-of-root-containers-automated",level:3},{value:"5.2.8 Minimize the admission of containers with the NET_RAW capability (Automated)",id:"528-minimize-the-admission-of-containers-with-the-net_raw-capability-automated",level:3},{value:"5.2.9 Minimize the admission of containers with added capabilities (Automated)",id:"529-minimize-the-admission-of-containers-with-added-capabilities-automated",level:3},{value:"5.2.10 Minimize the admission of containers with capabilities assigned (Manual)",id:"5210-minimize-the-admission-of-containers-with-capabilities-assigned-manual",level:3},{value:"5.2.11 Minimize the admission of Windows HostProcess containers (Manual)",id:"5211-minimize-the-admission-of-windows-hostprocess-containers-manual",level:3},{value:"5.2.12 Minimize the admission of HostPath volumes (Manual)",id:"5212-minimize-the-admission-of-hostpath-volumes-manual",level:3},{value:"5.2.13 Minimize the admission of containers which use HostPorts (Manual)",id:"5213-minimize-the-admission-of-containers-which-use-hostports-manual",level:3},{value:"5.3 Network Policies and CNI",id:"53-network-policies-and-cni",level:2},{value:"5.3.1 Ensure that the CNI in use supports NetworkPolicies (Manual)",id:"531-ensure-that-the-cni-in-use-supports-networkpolicies-manual",level:3},{value:"5.3.2 Ensure that all Namespaces have Network Policies defined (Automated)",id:"532-ensure-that-all-namespaces-have-network-policies-defined-automated",level:3},{value:"5.4 Secrets Management",id:"54-secrets-management",level:2},{value:"5.4.1 Prefer using Secrets as files over Secrets as environment variables (Manual)",id:"541-prefer-using-secrets-as-files-over-secrets-as-environment-variables-manual",level:3},{value:"5.4.2 Consider external secret storage (Manual)",id:"542-consider-external-secret-storage-manual",level:3},{value:"5.5 Extensible Admission Control",id:"55-extensible-admission-control",level:2},{value:"5.5.1 Configure Image Provenance using ImagePolicyWebhook admission controller (Manual)",id:"551-configure-image-provenance-using-imagepolicywebhook-admission-controller-manual",level:3},{value:"5.7 General Policies",id:"57-general-policies",level:2},{value:"5.7.1 Create administrative boundaries between resources using namespaces (Manual)",id:"571-create-administrative-boundaries-between-resources-using-namespaces-manual",level:3},{value:"5.7.2 Ensure that the seccomp profile is set to docker/default in your Pod definitions (Manual)",id:"572-ensure-that-the-seccomp-profile-is-set-to-dockerdefault-in-your-pod-definitions-manual",level:3},{value:"5.7.3 Apply SecurityContext to your Pods and Containers (Manual)",id:"573-apply-securitycontext-to-your-pods-and-containers-manual",level:3},{value:"5.7.4 The default namespace should not be used (Automated)",id:"574-the-default-namespace-should-not-be-used-automated",level:3}],c={toc:u};function p(e){let{components:t,...r}=e;return(0,n.kt)("wrapper",(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"This document is a companion to the ",(0,n.kt)("a",{parentName:"p",href:"/pages-for-subheaders/rke1-hardening-guide"},"RKE Hardening Guide"),", which provides prescriptive guidance on how to harden RKE clusters that are running in production and managed by Rancher. This benchmark guide helps you evaluate the security of a hardened cluster against each control in the CIS Kubernetes Benchmark."),(0,n.kt)("p",null,"This guide corresponds to the following versions of Rancher, CIS Benchmarks, and Kubernetes:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Rancher Version"),(0,n.kt)("th",{parentName:"tr",align:null},"CIS Benchmark Version"),(0,n.kt)("th",{parentName:"tr",align:null},"Kubernetes Version"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},"Rancher v2.7"),(0,n.kt)("td",{parentName:"tr",align:null},"Benchmark v1.23"),(0,n.kt)("td",{parentName:"tr",align:null},"Kubernetes v1.23")))),(0,n.kt)("p",null,"This guide walks through the various controls and provide updated example commands to audit compliance in Rancher created clusters. Because Rancher and RKE install Kubernetes services as Docker containers, many of the control verification checks in the CIS Kubernetes Benchmark don't apply. These checks will return a result of ",(0,n.kt)("inlineCode",{parentName:"p"},"Not Applicable"),"."),(0,n.kt)("p",null,"This document is for Rancher operators, security teams, auditors and decision makers."),(0,n.kt)("p",null,"For more information about each control, including detailed descriptions and remediations for failing tests, refer to the corresponding section of the CIS Kubernetes Benchmark v1.23. You can download the benchmark, after creating a free account, at ",(0,n.kt)("a",{parentName:"p",href:"https://www.cisecurity.org/benchmark/kubernetes/"},"Center for Internet Security (CIS)"),"."),(0,n.kt)("h2",{id:"testing-methodology"},"Testing Methodology"),(0,n.kt)("p",null,"Rancher and RKE install Kubernetes services via Docker containers. Configuration is defined by arguments passed to the container at the time of initialization, not via configuration files."),(0,n.kt)("p",null,"Where control audits differ from the original CIS benchmark, the audit commands specific to Rancher are provided for testing. When performing the tests, you will need access to the command line on the hosts of all RKE nodes. The commands also make use of the ",(0,n.kt)("a",{parentName:"p",href:"https://kubernetes.io/docs/tasks/tools/"},"kubectl")," (with a valid configuration file) and ",(0,n.kt)("a",{parentName:"p",href:"https://stedolan.github.io/jq/"},"jq")," tools, which are required in the testing and evaluation of test results."),(0,n.kt)("admonition",{type:"note"},(0,n.kt)("p",{parentName:"admonition"},"This guide only covers ",(0,n.kt)("inlineCode",{parentName:"p"},"automated")," (previously called ",(0,n.kt)("inlineCode",{parentName:"p"},"scored"),") tests.")),(0,n.kt)("h3",{id:"controls"},"Controls"),(0,n.kt)("h2",{id:"11-master-node-configuration-files"},"1.1 Master Node Configuration Files"),(0,n.kt)("h3",{id:"111-ensure-that-the-api-server-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.1 Ensure that the API server pod specification file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for kube-apiserver.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"112-ensure-that-the-api-server-pod-specification-file-ownership-is-set-to-rootroot-automated"},"1.1.2 Ensure that the API server pod specification file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for kube-apiserver.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"113-ensure-that-the-controller-manager-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.3 Ensure that the controller manager pod specification file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for controller-manager.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"114-ensure-that-the-controller-manager-pod-specification-file-ownership-is-set-to-rootroot-automated"},"1.1.4 Ensure that the controller manager pod specification file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for controller-manager.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"115-ensure-that-the-scheduler-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.5 Ensure that the scheduler pod specification file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for scheduler.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"116-ensure-that-the-scheduler-pod-specification-file-ownership-is-set-to-rootroot-automated"},"1.1.6 Ensure that the scheduler pod specification file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for scheduler.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"117-ensure-that-the-etcd-pod-specification-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.7 Ensure that the etcd pod specification file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for etcd.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"118-ensure-that-the-etcd-pod-specification-file-ownership-is-set-to-rootroot-automated"},"1.1.8 Ensure that the etcd pod specification file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for etcd.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"119-ensure-that-the-container-network-interface-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.9 Ensure that the Container Network Interface file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 644 <path/to/cni/files",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"ps -fC ${kubeletbin:-kubelet} | grep -- --cni-conf-dir || echo \"/etc/cni/net.d\" | sed 's%.*cni-conf-dir[= ]\\([^ ]*\\).*%\\1%' | xargs -I{} find {} -mindepth 1 | xargs --no-run-if-empty stat -c permissions=%a find /var/lib/cni/networks -type f 2> /dev/null | xargs --no-run-if-empty stat -c permissions=%a\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'permissions' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"1110-ensure-that-the-container-network-interface-file-ownership-is-set-to-rootroot-automated"},"1.1.10 Ensure that the Container Network Interface file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root <path/to/cni/files",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"ps -fC ${kubeletbin:-kubelet} | grep -- --cni-conf-dir || echo \"/etc/cni/net.d\" | sed 's%.*cni-conf-dir[= ]\\([^ ]*\\).*%\\1%' | xargs -I{} find {} -mindepth 1 | xargs --no-run-if-empty stat -c %U:%G find /var/lib/cni/networks -type f 2> /dev/null | xargs --no-run-if-empty stat -c %U:%G\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'root:root' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"1111-ensure-that-the-etcd-data-directory-permissions-are-set-to-700-or-more-restrictive-automated"},"1.1.11 Ensure that the etcd data directory permissions are set to 700 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nOn the etcd server node, get the etcd data directory, passed as an argument --data-dir,\nfrom the command 'ps -ef | grep etcd'.\nRun the below command (based on the etcd data directory found above). For example,\nchmod 700 /var/lib/etcd"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"stat -c %a /node/var/lib/etcd\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'700' is equal to '700'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"700\n")),(0,n.kt)("h3",{id:"1112-ensure-that-the-etcd-data-directory-ownership-is-set-to-etcdetcd-automated"},"1.1.12 Ensure that the etcd data directory ownership is set to etcd:etcd (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nOn the etcd server node, get the etcd data directory, passed as an argument --data-dir,\nfrom the command 'ps -ef | grep etcd'.\nRun the below command (based on the etcd data directory found above).\nFor example, chown etcd:etcd /var/lib/etcd"),(0,n.kt)("h3",{id:"1113-ensure-that-the-adminconf-file-permissions-are-set-to-600-or-more-restrictive-automated"},"1.1.13 Ensure that the admin.conf file permissions are set to 600 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE does not store the kubernetes default kubeconfig credentials file on the nodes."),(0,n.kt)("h3",{id:"1114-ensure-that-the-adminconf-file-ownership-is-set-to-rootroot-automated"},"1.1.14 Ensure that the admin.conf file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE does not store the kubernetes default kubeconfig credentials file on the nodes."),(0,n.kt)("h3",{id:"1115-ensure-that-the-schedulerconf-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.15 Ensure that the scheduler.conf file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for scheduler.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"1116-ensure-that-the-schedulerconf-file-ownership-is-set-to-rootroot-automated"},"1.1.16 Ensure that the scheduler.conf file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for scheduler.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"1117-ensure-that-the-controller-managerconf-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.17 Ensure that the controller-manager.conf file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for controller-manager.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"1118-ensure-that-the-controller-managerconf-file-ownership-is-set-to-rootroot-automated"},"1.1.18 Ensure that the controller-manager.conf file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn't require or maintain a configuration file for controller-manager.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"1119-ensure-that-the-kubernetes-pki-directory-and-file-ownership-is-set-to-rootroot-automated"},"1.1.19 Ensure that the Kubernetes PKI directory and file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the master node.\nFor example,\nchown -R root:root /etc/kubernetes/pki/"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Script:")," ",(0,n.kt)("inlineCode",{parentName:"p"},"check_files_owner_in_dir.sh")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},'#!/usr/bin/env bash\n\n# This script is used to ensure the owner is set to root:root for\n# the given directory and all the files in it\n#\n# inputs:\n# $1 = /full/path/to/directory\n#\n# outputs:\n# true/false\n\nINPUT_DIR=$1\n\nif [[ "${INPUT_DIR}" == "" ]]; then\n echo "false"\n exit\nfi\n\nif [[ $(stat -c %U:%G ${INPUT_DIR}) != "root:root" ]]; then\n echo "false"\n exit\nfi\n\nstatInfoLines=$(stat -c "%n %U:%G" ${INPUT_DIR}/*)\nwhile read -r statInfoLine; do\n f=$(echo ${statInfoLine} | cut -d\' \' -f1)\n p=$(echo ${statInfoLine} | cut -d\' \' -f2)\n\n if [[ $(basename "$f" .pem) == "kube-etcd-"* ]]; then\n if [[ "$p" != "root:root" && "$p" != "etcd:etcd" ]]; then\n echo "false"\n exit\n fi\n else\n if [[ "$p" != "root:root" ]]; then\n echo "false"\n exit\n fi\n fi\ndone <<< "${statInfoLines}"\n\n\necho "true"\nexit\n\n')),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Execution:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"./check_files_owner_in_dir.sh /node/etc/kubernetes/ssl\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'true' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"true\n")),(0,n.kt)("h3",{id:"1120-ensure-that-the-kubernetes-pki-certificate-file-permissions-are-set-to-644-or-more-restrictive-automated"},"1.1.20 Ensure that the Kubernetes PKI certificate file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the master node.\nFor example,\nchmod -R 644 /etc/kubernetes/pki/*.crt"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Script:")," ",(0,n.kt)("inlineCode",{parentName:"p"},"check_files_permissions.sh")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},'#!/usr/bin/env bash\n\n# This script is used to ensure the file permissions are set to 644 or\n# more restrictive for all files in a given directory or a wildcard\n# selection of files\n#\n# inputs:\n# $1 = /full/path/to/directory or /path/to/fileswithpattern\n# ex: !(*key).pem\n#\n# $2 (optional) = permission (ex: 600)\n#\n# outputs:\n# true/false\n\n# Turn on "extended glob" for use of \'!\' in wildcard\nshopt -s extglob\n\n# Turn off history to avoid surprises when using \'!\'\nset -H\n\nUSER_INPUT=$1\n\nif [[ "${USER_INPUT}" == "" ]]; then\n echo "false"\n exit\nfi\n\n\nif [[ -d ${USER_INPUT} ]]; then\n PATTERN="${USER_INPUT}/*"\nelse\n PATTERN="${USER_INPUT}"\nfi\n\nPERMISSION=""\nif [[ "$2" != "" ]]; then\n PERMISSION=$2\nfi\n\nFILES_PERMISSIONS=$(stat -c %n\\ %a ${PATTERN})\n\nwhile read -r fileInfo; do\n p=$(echo ${fileInfo} | cut -d\' \' -f2)\n\n if [[ "${PERMISSION}" != "" ]]; then\n if [[ "$p" != "${PERMISSION}" ]]; then\n echo "false"\n exit\n fi\n else\n if [[ "$p" != "644" && "$p" != "640" && "$p" != "600" ]]; then\n echo "false"\n exit\n fi\n fi\ndone <<< "${FILES_PERMISSIONS}"\n\n\necho "true"\nexit\n\n')),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Execution:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"./check_files_permissions.sh '/node/etc/kubernetes/ssl/!(*key).pem'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'true' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"true\n")),(0,n.kt)("h3",{id:"1121-ensure-that-the-kubernetes-pki-key-file-permissions-are-set-to-600-automated"},"1.1.21 Ensure that the Kubernetes PKI key file permissions are set to 600 (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod -R 600 /etc/kubernetes/ssl/*key.pem"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Script:")," ",(0,n.kt)("inlineCode",{parentName:"p"},"check_files_permissions.sh")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},'#!/usr/bin/env bash\n\n# This script is used to ensure the file permissions are set to 644 or\n# more restrictive for all files in a given directory or a wildcard\n# selection of files\n#\n# inputs:\n# $1 = /full/path/to/directory or /path/to/fileswithpattern\n# ex: !(*key).pem\n#\n# $2 (optional) = permission (ex: 600)\n#\n# outputs:\n# true/false\n\n# Turn on "extended glob" for use of \'!\' in wildcard\nshopt -s extglob\n\n# Turn off history to avoid surprises when using \'!\'\nset -H\n\nUSER_INPUT=$1\n\nif [[ "${USER_INPUT}" == "" ]]; then\n echo "false"\n exit\nfi\n\n\nif [[ -d ${USER_INPUT} ]]; then\n PATTERN="${USER_INPUT}/*"\nelse\n PATTERN="${USER_INPUT}"\nfi\n\nPERMISSION=""\nif [[ "$2" != "" ]]; then\n PERMISSION=$2\nfi\n\nFILES_PERMISSIONS=$(stat -c %n\\ %a ${PATTERN})\n\nwhile read -r fileInfo; do\n p=$(echo ${fileInfo} | cut -d\' \' -f2)\n\n if [[ "${PERMISSION}" != "" ]]; then\n if [[ "$p" != "${PERMISSION}" ]]; then\n echo "false"\n exit\n fi\n else\n if [[ "$p" != "644" && "$p" != "640" && "$p" != "600" ]]; then\n echo "false"\n exit\n fi\n fi\ndone <<< "${FILES_PERMISSIONS}"\n\n\necho "true"\nexit\n\n')),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Execution:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"./check_files_permissions.sh '/node/etc/kubernetes/ssl/*key.pem'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'true' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"true\n")),(0,n.kt)("h2",{id:"12-api-server"},"1.2 API Server"),(0,n.kt)("h3",{id:"121-ensure-that-the---anonymous-auth-argument-is-set-to-false-automated"},"1.2.1 Ensure that the --anonymous-auth argument is set to false (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--anonymous-auth=false"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--anonymous-auth' is equal to 'false'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"122-ensure-that-the---token-auth-file-parameter-is-not-set-automated"},"1.2.2 Ensure that the --token-auth-file parameter is not set (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the documentation and configure alternate mechanisms for authentication. Then,\nedit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the --token-auth-file=<filename",">"," parameter."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--token-auth-file' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"123-ensure-that-the---denyserviceexternalips-is-not-set-automated"},"1.2.3 Ensure that the --DenyServiceExternalIPs is not set (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the ",(0,n.kt)("inlineCode",{parentName:"p"},"DenyServiceExternalIPs"),"\nfrom enabled admission plugins."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--enable-admission-plugins' does not have 'DenyServiceExternalIPs' OR '--enable-admission-plugins' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"124-ensure-that-the---kubelet-https-argument-is-set-to-true-automated"},"1.2.4 Ensure that the --kubelet-https argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the --kubelet-https parameter."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--kubelet-https' is present OR '--kubelet-https' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"125-ensure-that-the---kubelet-client-certificate-and---kubelet-client-key-arguments-are-set-as-appropriate-automated"},"1.2.5 Ensure that the --kubelet-client-certificate and --kubelet-client-key arguments are set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and set up the TLS connection between the\napiserver and kubelets. Then, edit API server pod specification file\n/etc/kubernetes/manifests/kube-apiserver.yaml on the control plane node and set the\nkubelet client certificate and key parameters as below.\n--kubelet-client-certificate=<path/to/client-certificate-file",">","\n--kubelet-client-key=<path/to/client-key-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--kubelet-client-certificate' is present AND '--kubelet-client-key' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"126-ensure-that-the---kubelet-certificate-authority-argument-is-set-as-appropriate-automated"},"1.2.6 Ensure that the --kubelet-certificate-authority argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and setup the TLS connection between\nthe apiserver and kubelets. Then, edit the API server pod specification file\n/etc/kubernetes/manifests/kube-apiserver.yaml on the control plane node and set the\n--kubelet-certificate-authority parameter to the path to the cert file for the certificate authority.\n--kubelet-certificate-authority=<ca-string",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--kubelet-certificate-authority' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"127-ensure-that-the---authorization-mode-argument-is-not-set-to-alwaysallow-automated"},"1.2.7 Ensure that the --authorization-mode argument is not set to AlwaysAllow (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to values other than AlwaysAllow.\nOne such example could be as below.\n--authorization-mode=RBAC"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--authorization-mode' does not have 'AlwaysAllow'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"128-ensure-that-the---authorization-mode-argument-includes-node-automated"},"1.2.8 Ensure that the --authorization-mode argument includes Node (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to a value that includes Node.\n--authorization-mode=Node,RBAC"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--authorization-mode' has 'Node'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"129-ensure-that-the---authorization-mode-argument-includes-rbac-automated"},"1.2.9 Ensure that the --authorization-mode argument includes RBAC (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to a value that includes RBAC,\nfor example ",(0,n.kt)("inlineCode",{parentName:"p"},"--authorization-mode=Node,RBAC"),"."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--authorization-mode' has 'RBAC'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1210-ensure-that-the-admission-control-plugin-eventratelimit-is-set-manual"},"1.2.10 Ensure that the admission control plugin EventRateLimit is set (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and set the desired limits in a configuration file.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\nand set the below parameters.\n--enable-admission-plugins=...,EventRateLimit,...\n--admission-control-config-file=<path/to/configuration/file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--enable-admission-plugins' has 'EventRateLimit'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1211-ensure-that-the-admission-control-plugin-alwaysadmit-is-not-set-automated"},"1.2.11 Ensure that the admission control plugin AlwaysAdmit is not set (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and either remove the --enable-admission-plugins parameter, or set it to a\nvalue that does not include AlwaysAdmit."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--enable-admission-plugins' does not have 'AlwaysAdmit' OR '--enable-admission-plugins' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1212-ensure-that-the-admission-control-plugin-alwayspullimages-is-set-manual"},"1.2.12 Ensure that the admission control plugin AlwaysPullImages is set (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to include\nAlwaysPullImages.\n--enable-admission-plugins=...,AlwaysPullImages,..."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("h3",{id:"1213-ensure-that-the-admission-control-plugin-securitycontextdeny-is-set-if-podsecuritypolicy-is-not-used-manual"},"1.2.13 Ensure that the admission control plugin SecurityContextDeny is set if PodSecurityPolicy is not used (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to include\nSecurityContextDeny, unless PodSecurityPolicy is already in place.\n--enable-admission-plugins=...,SecurityContextDeny,..."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("h3",{id:"1214-ensure-that-the-admission-control-plugin-serviceaccount-is-set-automated"},"1.2.14 Ensure that the admission control plugin ServiceAccount is set (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the documentation and create ServiceAccount objects as per your environment.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and ensure that the --disable-admission-plugins parameter is set to a\nvalue that does not include ServiceAccount."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--disable-admission-plugins' is present OR '--disable-admission-plugins' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1215-ensure-that-the-admission-control-plugin-namespacelifecycle-is-set-automated"},"1.2.15 Ensure that the admission control plugin NamespaceLifecycle is set (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --disable-admission-plugins parameter to\nensure it does not include NamespaceLifecycle."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--disable-admission-plugins' is present OR '--disable-admission-plugins' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1216-ensure-that-the-admission-control-plugin-noderestriction-is-set-automated"},"1.2.16 Ensure that the admission control plugin NodeRestriction is set (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and configure NodeRestriction plug-in on kubelets.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to a\nvalue that includes NodeRestriction.\n--enable-admission-plugins=...,NodeRestriction,..."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--enable-admission-plugins' has 'NodeRestriction'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1217-ensure-that-the---secure-port-argument-is-not-set-to-0-automated"},"1.2.17 Ensure that the --secure-port argument is not set to 0 (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and either remove the --secure-port parameter or\nset it to a different (non-zero) desired port."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--secure-port' is greater than 0 OR '--secure-port' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1218-ensure-that-the---profiling-argument-is-set-to-false-automated"},"1.2.18 Ensure that the --profiling argument is set to false (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--profiling=false"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--profiling' is equal to 'false'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1219-ensure-that-the---audit-log-path-argument-is-set-automated"},"1.2.19 Ensure that the --audit-log-path argument is set (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-path parameter to a suitable path and\nfile where you would like audit logs to be written, for example,\n--audit-log-path=/var/log/apiserver/audit.log"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--audit-log-path' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1220-ensure-that-the---audit-log-maxage-argument-is-set-to-30-or-as-appropriate-automated"},"1.2.20 Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxage parameter to 30\nor as an appropriate number of days, for example,\n--audit-log-maxage=30"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--audit-log-maxage' is greater or equal to 30\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1221-ensure-that-the---audit-log-maxbackup-argument-is-set-to-10-or-as-appropriate-automated"},"1.2.21 Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxbackup parameter to 10 or to an appropriate\nvalue. For example,\n--audit-log-maxbackup=10"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--audit-log-maxbackup' is greater or equal to 10\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1222-ensure-that-the---audit-log-maxsize-argument-is-set-to-100-or-as-appropriate-automated"},"1.2.22 Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxsize parameter to an appropriate size in MB.\nFor example, to set it as 100 MB, --audit-log-maxsize=100"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--audit-log-maxsize' is greater or equal to 100\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1224-ensure-that-the---service-account-lookup-argument-is-set-to-true-automated"},"1.2.24 Ensure that the --service-account-lookup argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--service-account-lookup=true\nAlternatively, you can delete the --service-account-lookup parameter from this file so\nthat the default takes effect."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--service-account-lookup' is not present OR '--service-account-lookup' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1225-ensure-that-the---request-timeout-argument-is-set-as-appropriate-automated"},"1.2.25 Ensure that the --request-timeout argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --service-account-key-file parameter\nto the public key file for service accounts. For example,\n--service-account-key-file=<filename",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--service-account-key-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1226-ensure-that-the---etcd-certfile-and---etcd-keyfile-arguments-are-set-as-appropriate-automated"},"1.2.26 Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the etcd certificate and key file parameters.\n--etcd-certfile=<path/to/client-certificate-file",">","\n--etcd-keyfile=<path/to/client-key-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--etcd-certfile' is present AND '--etcd-keyfile' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1227-ensure-that-the---tls-cert-file-and---tls-private-key-file-arguments-are-set-as-appropriate-automated"},"1.2.27 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and set up the TLS connection on the apiserver.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the TLS certificate and private key file parameters.\n--tls-cert-file=<path/to/tls-certificate-file",">","\n--tls-private-key-file=<path/to/tls-key-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--tls-cert-file' is present AND '--tls-private-key-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1228-ensure-that-the---client-ca-file-argument-is-set-as-appropriate-automated"},"1.2.28 Ensure that the --client-ca-file argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and set up the TLS connection on the apiserver.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the client certificate authority file.\n--client-ca-file=<path/to/client-ca-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--client-ca-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1229-ensure-that-the---etcd-cafile-argument-is-set-as-appropriate-automated"},"1.2.29 Ensure that the --etcd-cafile argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the etcd certificate authority file parameter.\n--etcd-cafile=<path/to/ca-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--etcd-cafile' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1230-ensure-that-the---encryption-provider-config-argument-is-set-as-appropriate-manual"},"1.2.30 Ensure that the --encryption-provider-config argument is set as appropriate (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and configure a EncryptionConfig file.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --encryption-provider-config parameter to the path of that file.\nFor example, --encryption-provider-config=</path/to/EncryptionConfig/File",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--encryption-provider-config' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"1231-ensure-that-encryption-providers-are-appropriately-configured-automated"},"1.2.31 Ensure that encryption providers are appropriately configured (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and configure a EncryptionConfig file.\nIn this file, choose aescbc, kms or secretbox as the encryption provider."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Script:")," ",(0,n.kt)("inlineCode",{parentName:"p"},"check_encryption_provider_config.sh")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},'#!/usr/bin/env bash\n\n# This script is used to check the encrption provider config is set to aesbc\n#\n# outputs:\n# true/false\n\n# TODO: Figure out the file location from the kube-apiserver commandline args\nENCRYPTION_CONFIG_FILE="/node/etc/kubernetes/ssl/encryption.yaml"\n\nif [[ ! -f "${ENCRYPTION_CONFIG_FILE}" ]]; then\n echo "false"\n exit\nfi\n\nfor provider in "$@"\ndo\n if grep "$provider" "${ENCRYPTION_CONFIG_FILE}"; then\n echo "true"\n exit\n fi\ndone\n\necho "false"\nexit\n\n')),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Execution:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"./check_encryption_provider_config.sh aescbc\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'true' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"- aescbc: true\n")),(0,n.kt)("h3",{id:"1232-ensure-that-the-api-server-only-makes-use-of-strong-cryptographic-ciphers-automated"},"1.2.32 Ensure that the API Server only makes use of Strong Cryptographic Ciphers (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--tls-cipher-suites=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,\nTLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,\nTLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,\nTLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,\nTLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,\nTLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,\nTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,\nTLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_GCM_SHA384"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--tls-cipher-suites' contains valid elements from 'TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_GCM_SHA384'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h2",{id:"13-controller-manager"},"1.3 Controller Manager"),(0,n.kt)("h3",{id:"131-ensure-that-the---terminated-pod-gc-threshold-argument-is-set-as-appropriate-automated"},"1.3.1 Ensure that the --terminated-pod-gc-threshold argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the --terminated-pod-gc-threshold to an appropriate threshold,\nfor example, --terminated-pod-gc-threshold=10"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-controller-manager | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--terminated-pod-gc-threshold' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5411 5390 2 21:34 ? 00:00:06 kube-controller-manager --service-account-private-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --service-cluster-ip-range=10.43.0.0/16 --allow-untagged-cloud=true --leader-elect=true --terminated-pod-gc-threshold=1000 --allocate-node-cidrs=true --node-monitor-grace-period=40s --root-ca-file=/etc/kubernetes/ssl/kube-ca.pem --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --feature-gates=RotateKubeletServerCertificate=true --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --profiling=false --configure-cloud-routes=false --enable-hostpath-provisioner=false --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --address=0.0.0.0 --v=2 --cloud-provider= --pod-eviction-timeout=5m0s --cluster-cidr=10.42.0.0/16 --use-service-account-credentials=true\n")),(0,n.kt)("h3",{id:"132-ensure-that-the---profiling-argument-is-set-to-false-automated"},"1.3.2 Ensure that the --profiling argument is set to false (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the below parameter.\n--profiling=false"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-controller-manager | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--profiling' is equal to 'false'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5411 5390 2 21:34 ? 00:00:06 kube-controller-manager --service-account-private-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --service-cluster-ip-range=10.43.0.0/16 --allow-untagged-cloud=true --leader-elect=true --terminated-pod-gc-threshold=1000 --allocate-node-cidrs=true --node-monitor-grace-period=40s --root-ca-file=/etc/kubernetes/ssl/kube-ca.pem --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --feature-gates=RotateKubeletServerCertificate=true --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --profiling=false --configure-cloud-routes=false --enable-hostpath-provisioner=false --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --address=0.0.0.0 --v=2 --cloud-provider= --pod-eviction-timeout=5m0s --cluster-cidr=10.42.0.0/16 --use-service-account-credentials=true\n")),(0,n.kt)("h3",{id:"133-ensure-that-the---use-service-account-credentials-argument-is-set-to-true-automated"},"1.3.3 Ensure that the --use-service-account-credentials argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node to set the below parameter.\n--use-service-account-credentials=true"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-controller-manager | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--use-service-account-credentials' is not equal to 'false'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5411 5390 2 21:34 ? 00:00:06 kube-controller-manager --service-account-private-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --service-cluster-ip-range=10.43.0.0/16 --allow-untagged-cloud=true --leader-elect=true --terminated-pod-gc-threshold=1000 --allocate-node-cidrs=true --node-monitor-grace-period=40s --root-ca-file=/etc/kubernetes/ssl/kube-ca.pem --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --feature-gates=RotateKubeletServerCertificate=true --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --profiling=false --configure-cloud-routes=false --enable-hostpath-provisioner=false --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --address=0.0.0.0 --v=2 --cloud-provider= --pod-eviction-timeout=5m0s --cluster-cidr=10.42.0.0/16 --use-service-account-credentials=true\n")),(0,n.kt)("h3",{id:"134-ensure-that-the---service-account-private-key-file-argument-is-set-as-appropriate-automated"},"1.3.4 Ensure that the --service-account-private-key-file argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the --service-account-private-key-file parameter\nto the private key file for service accounts.\n--service-account-private-key-file=<filename",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-controller-manager | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--service-account-private-key-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5411 5390 2 21:34 ? 00:00:06 kube-controller-manager --service-account-private-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --service-cluster-ip-range=10.43.0.0/16 --allow-untagged-cloud=true --leader-elect=true --terminated-pod-gc-threshold=1000 --allocate-node-cidrs=true --node-monitor-grace-period=40s --root-ca-file=/etc/kubernetes/ssl/kube-ca.pem --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --feature-gates=RotateKubeletServerCertificate=true --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --profiling=false --configure-cloud-routes=false --enable-hostpath-provisioner=false --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --address=0.0.0.0 --v=2 --cloud-provider= --pod-eviction-timeout=5m0s --cluster-cidr=10.42.0.0/16 --use-service-account-credentials=true\n")),(0,n.kt)("h3",{id:"135-ensure-that-the---root-ca-file-argument-is-set-as-appropriate-automated"},"1.3.5 Ensure that the --root-ca-file argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the --root-ca-file parameter to the certificate bundle file`.\n--root-ca-file=<path/to/file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-controller-manager | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--root-ca-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5411 5390 2 21:34 ? 00:00:06 kube-controller-manager --service-account-private-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --service-cluster-ip-range=10.43.0.0/16 --allow-untagged-cloud=true --leader-elect=true --terminated-pod-gc-threshold=1000 --allocate-node-cidrs=true --node-monitor-grace-period=40s --root-ca-file=/etc/kubernetes/ssl/kube-ca.pem --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --feature-gates=RotateKubeletServerCertificate=true --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --profiling=false --configure-cloud-routes=false --enable-hostpath-provisioner=false --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --address=0.0.0.0 --v=2 --cloud-provider= --pod-eviction-timeout=5m0s --cluster-cidr=10.42.0.0/16 --use-service-account-credentials=true\n")),(0,n.kt)("h3",{id:"136-ensure-that-the-rotatekubeletservercertificate-argument-is-set-to-true-automated"},"1.3.6 Ensure that the RotateKubeletServerCertificate argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the --feature-gates parameter to include RotateKubeletServerCertificate=true.\n--feature-gates=RotateKubeletServerCertificate=true"),(0,n.kt)("p",null,"Cluster provisioned by RKE handles certificate rotation directly through RKE."),(0,n.kt)("h3",{id:"137-ensure-that-the---bind-address-argument-is-set-to-127001-automated"},"1.3.7 Ensure that the --bind-address argument is set to 127.0.0.1 (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and ensure the correct value for the --bind-address parameter"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-controller-manager | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--bind-address' is present OR '--bind-address' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5411 5390 2 21:34 ? 00:00:06 kube-controller-manager --service-account-private-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --service-cluster-ip-range=10.43.0.0/16 --allow-untagged-cloud=true --leader-elect=true --terminated-pod-gc-threshold=1000 --allocate-node-cidrs=true --node-monitor-grace-period=40s --root-ca-file=/etc/kubernetes/ssl/kube-ca.pem --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --feature-gates=RotateKubeletServerCertificate=true --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --profiling=false --configure-cloud-routes=false --enable-hostpath-provisioner=false --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-controller-manager.yaml --address=0.0.0.0 --v=2 --cloud-provider= --pod-eviction-timeout=5m0s --cluster-cidr=10.42.0.0/16 --use-service-account-credentials=true\n")),(0,n.kt)("h2",{id:"14-scheduler"},"1.4 Scheduler"),(0,n.kt)("h3",{id:"141-ensure-that-the---profiling-argument-is-set-to-false-automated"},"1.4.1 Ensure that the --profiling argument is set to false (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Scheduler pod specification file /etc/kubernetes/manifests/kube-scheduler.yaml file\non the control plane node and set the below parameter.\n--profiling=false"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-scheduler | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--profiling' is equal to 'false'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5564 5543 0 21:34 ? 00:00:01 kube-scheduler --v=2 --address=0.0.0.0 --leader-elect=true --profiling=false --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-scheduler.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-scheduler.yaml --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-scheduler.yaml\n")),(0,n.kt)("h3",{id:"142-ensure-that-the---bind-address-argument-is-set-to-127001-automated"},"1.4.2 Ensure that the --bind-address argument is set to 127.0.0.1 (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the Scheduler pod specification file /etc/kubernetes/manifests/kube-scheduler.yaml\non the control plane node and ensure the correct value for the --bind-address parameter"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-scheduler | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--bind-address' is present OR '--bind-address' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5564 5543 0 21:34 ? 00:00:01 kube-scheduler --v=2 --address=0.0.0.0 --leader-elect=true --profiling=false --authentication-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-scheduler.yaml --authorization-kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-scheduler.yaml --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-scheduler.yaml\n")),(0,n.kt)("h2",{id:"2-etcd-node-configuration"},"2 Etcd Node Configuration"),(0,n.kt)("h3",{id:"21-ensure-that-the---cert-file-and---key-file-arguments-are-set-as-appropriate-automated"},"2.1 Ensure that the --cert-file and --key-file arguments are set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the etcd service documentation and configure TLS encryption.\nThen, edit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml\non the master node and set the below parameters.\n--cert-file=</path/to/ca-file",">","\n--key-file=</path/to/key-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | /bin/grep etcd | /bin/grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--cert-file' is present AND '--key-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"etcd 5096 5076 3 21:34 ? 00:00:08 /usr/local/bin/etcd --initial-cluster=etcd-ip-172-31-26-226=https://172.31.26.226:2380 --peer-trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --peer-cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --initial-cluster-token=etcd-cluster-1 --name=etcd-ip-172-31-26-226 --listen-client-urls=https://172.31.26.226:2379 --listen-peer-urls=https://172.31.26.226:2380 --client-cert-auth=true --election-timeout=5000 --initial-advertise-peer-urls=https://172.31.26.226:2380 --key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --initial-cluster-state=new --advertise-client-urls=https://172.31.26.226:2379 --heartbeat-interval=500 --peer-client-cert-auth=true --data-dir=/var/lib/rancher/etcd/ --trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --peer-key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 root 5258 5238 18 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16 root 17615 17594 5 21:38 ? 00:00:00 kube-bench run --targets etcd --scored --nosummary --noremediations --v=0 --config-dir=/etc/kube-bench/cfg --benchmark rke-cis-1.23-hardened --json --log_dir /tmp/sonobuoy/logs --outputfile /tmp/sonobuoy/etcd.json\n")),(0,n.kt)("h3",{id:"22-ensure-that-the---client-cert-auth-argument-is-set-to-true-automated"},"2.2 Ensure that the --client-cert-auth argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),'\nEdit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the master\nnode and set the below parameter.\n--client-cert-auth="true"'),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | /bin/grep etcd | /bin/grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--client-cert-auth' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"etcd 5096 5076 3 21:34 ? 00:00:08 /usr/local/bin/etcd --initial-cluster=etcd-ip-172-31-26-226=https://172.31.26.226:2380 --peer-trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --peer-cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --initial-cluster-token=etcd-cluster-1 --name=etcd-ip-172-31-26-226 --listen-client-urls=https://172.31.26.226:2379 --listen-peer-urls=https://172.31.26.226:2380 --client-cert-auth=true --election-timeout=5000 --initial-advertise-peer-urls=https://172.31.26.226:2380 --key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --initial-cluster-state=new --advertise-client-urls=https://172.31.26.226:2379 --heartbeat-interval=500 --peer-client-cert-auth=true --data-dir=/var/lib/rancher/etcd/ --trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --peer-key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 root 5258 5238 18 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16 root 17615 17594 3 21:38 ? 00:00:00 kube-bench run --targets etcd --scored --nosummary --noremediations --v=0 --config-dir=/etc/kube-bench/cfg --benchmark rke-cis-1.23-hardened --json --log_dir /tmp/sonobuoy/logs --outputfile /tmp/sonobuoy/etcd.json\n")),(0,n.kt)("h3",{id:"23-ensure-that-the---auto-tls-argument-is-not-set-to-true-automated"},"2.3 Ensure that the --auto-tls argument is not set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the master\nnode and either remove the --auto-tls parameter or set it to false.\n--auto-tls=false"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | /bin/grep etcd | /bin/grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'ETCD_AUTO_TLS' is not present OR 'ETCD_AUTO_TLS' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=ip-172-31-26-226 ETCDCTL_API=3 ETCDCTL_CACERT=/etc/kubernetes/ssl/kube-ca.pem ETCDCTL_CERT=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem ETCDCTL_KEY=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem ETCDCTL_ENDPOINTS=https://172.31.26.226:2379 ETCD_UNSUPPORTED_ARCH=x86_64 HOME=/\n")),(0,n.kt)("h3",{id:"24-ensure-that-the---peer-cert-file-and---peer-key-file-arguments-are-set-as-appropriate-automated"},"2.4 Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the etcd service documentation and configure peer TLS encryption as appropriate\nfor your etcd cluster.\nThen, edit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the\nmaster node and set the below parameters.\n--peer-client-file=</path/to/peer-cert-file",">","\n--peer-key-file=</path/to/peer-key-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | /bin/grep etcd | /bin/grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--peer-cert-file' is present AND '--peer-key-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"etcd 5096 5076 3 21:34 ? 00:00:08 /usr/local/bin/etcd --initial-cluster=etcd-ip-172-31-26-226=https://172.31.26.226:2380 --peer-trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --peer-cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --initial-cluster-token=etcd-cluster-1 --name=etcd-ip-172-31-26-226 --listen-client-urls=https://172.31.26.226:2379 --listen-peer-urls=https://172.31.26.226:2380 --client-cert-auth=true --election-timeout=5000 --initial-advertise-peer-urls=https://172.31.26.226:2380 --key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --initial-cluster-state=new --advertise-client-urls=https://172.31.26.226:2379 --heartbeat-interval=500 --peer-client-cert-auth=true --data-dir=/var/lib/rancher/etcd/ --trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --peer-key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 root 5258 5238 18 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16 root 17615 17594 3 21:38 ? 00:00:00 kube-bench run --targets etcd --scored --nosummary --noremediations --v=0 --config-dir=/etc/kube-bench/cfg --benchmark rke-cis-1.23-hardened --json --log_dir /tmp/sonobuoy/logs --outputfile /tmp/sonobuoy/etcd.json\n")),(0,n.kt)("h3",{id:"25-ensure-that-the---peer-client-cert-auth-argument-is-set-to-true-automated"},"2.5 Ensure that the --peer-client-cert-auth argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the master\nnode and set the below parameter.\n--peer-client-cert-auth=true"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | /bin/grep etcd | /bin/grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--peer-client-cert-auth' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"etcd 5096 5076 3 21:34 ? 00:00:08 /usr/local/bin/etcd --initial-cluster=etcd-ip-172-31-26-226=https://172.31.26.226:2380 --peer-trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --peer-cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --initial-cluster-token=etcd-cluster-1 --name=etcd-ip-172-31-26-226 --listen-client-urls=https://172.31.26.226:2379 --listen-peer-urls=https://172.31.26.226:2380 --client-cert-auth=true --election-timeout=5000 --initial-advertise-peer-urls=https://172.31.26.226:2380 --key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --initial-cluster-state=new --advertise-client-urls=https://172.31.26.226:2379 --heartbeat-interval=500 --peer-client-cert-auth=true --data-dir=/var/lib/rancher/etcd/ --trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --peer-key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 root 5258 5238 18 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16 root 17615 17594 3 21:38 ? 00:00:00 kube-bench run --targets etcd --scored --nosummary --noremediations --v=0 --config-dir=/etc/kube-bench/cfg --benchmark rke-cis-1.23-hardened --json --log_dir /tmp/sonobuoy/logs --outputfile /tmp/sonobuoy/etcd.json\n")),(0,n.kt)("h3",{id:"26-ensure-that-the---peer-auto-tls-argument-is-not-set-to-true-automated"},"2.6 Ensure that the --peer-auto-tls argument is not set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the master\nnode and either remove the --peer-auto-tls parameter or set it to false.\n--peer-auto-tls=false"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | /bin/grep etcd | /bin/grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'ETCD_PEER_AUTO_TLS' is not present OR 'ETCD_PEER_AUTO_TLS' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=ip-172-31-26-226 ETCDCTL_API=3 ETCDCTL_CACERT=/etc/kubernetes/ssl/kube-ca.pem ETCDCTL_CERT=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem ETCDCTL_KEY=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem ETCDCTL_ENDPOINTS=https://172.31.26.226:2379 ETCD_UNSUPPORTED_ARCH=x86_64 HOME=/\n")),(0,n.kt)("h3",{id:"27-ensure-that-a-unique-certificate-authority-is-used-for-etcd-automated"},"2.7 Ensure that a unique Certificate Authority is used for etcd (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\n","[Manual test]","\nFollow the etcd documentation and create a dedicated certificate authority setup for the\netcd service.\nThen, edit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml on the\nmaster node and set the below parameter.\n--trusted-ca-file=</path/to/ca-file",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | /bin/grep etcd | /bin/grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--trusted-ca-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"etcd 5096 5076 3 21:34 ? 00:00:08 /usr/local/bin/etcd --initial-cluster=etcd-ip-172-31-26-226=https://172.31.26.226:2380 --peer-trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --peer-cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226.pem --initial-cluster-token=etcd-cluster-1 --name=etcd-ip-172-31-26-226 --listen-client-urls=https://172.31.26.226:2379 --listen-peer-urls=https://172.31.26.226:2380 --client-cert-auth=true --election-timeout=5000 --initial-advertise-peer-urls=https://172.31.26.226:2380 --key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --initial-cluster-state=new --advertise-client-urls=https://172.31.26.226:2379 --heartbeat-interval=500 --peer-client-cert-auth=true --data-dir=/var/lib/rancher/etcd/ --trusted-ca-file=/etc/kubernetes/ssl/kube-ca.pem --peer-key-file=/etc/kubernetes/ssl/kube-etcd-172-31-26-226-key.pem --cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 root 5258 5238 18 21:34 ? 00:00:40 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16 root 17615 17594 2 21:38 ? 00:00:00 kube-bench run --targets etcd --scored --nosummary --noremediations --v=0 --config-dir=/etc/kube-bench/cfg --benchmark rke-cis-1.23-hardened --json --log_dir /tmp/sonobuoy/logs --outputfile /tmp/sonobuoy/etcd.json\n")),(0,n.kt)("h2",{id:"31-authentication-and-authorization"},"3.1 Authentication and Authorization"),(0,n.kt)("h3",{id:"311-client-certificate-authentication-should-not-be-used-for-users-manual"},"3.1.1 Client certificate authentication should not be used for users (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAlternative mechanisms provided by Kubernetes such as the use of OIDC should be\nimplemented in place of client certificates."),(0,n.kt)("h2",{id:"32-logging"},"3.2 Logging"),(0,n.kt)("h3",{id:"321-ensure-that-a-minimal-audit-policy-is-created-automated"},"3.2.1 Ensure that a minimal audit policy is created (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCreate an audit policy file for your cluster."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -ef | grep kube-apiserver | grep -v grep\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--audit-policy-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root 5258 5238 17 21:34 ? 00:00:41 kube-apiserver --encryption-provider-config=/etc/kubernetes/ssl/encryption.yaml --api-audiences=unknown --service-account-signing-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --requestheader-group-headers=X-Remote-Group --advertise-address=172.31.26.226 --audit-log-format=json --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --authentication-token-webhook-config-file=/etc/kubernetes/kube-api-authn-webhook.yaml --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,NodeRestriction,Priority,TaintNodesByCondition,PersistentVolumeClaimResize,PodSecurityPolicy,EventRateLimit --anonymous-auth=false --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --secure-port=6443 --audit-log-path=/var/log/kube-audit/audit-log.json --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem --etcd-prefix=/registry --etcd-servers=https://172.31.26.226:2379 --insecure-port=0 --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem --kubelet-certificate-authority=/etc/kubernetes/ssl/kube-ca.pem --runtime-config=policy/v1beta1/podsecuritypolicy=true --audit-log-maxsize=100 --cloud-provider= --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authentication-token-webhook-cache-ttl=5s --profiling=false --requestheader-extra-headers-prefix=X-Remote-Extra- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --audit-log-maxage=30 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --storage-backend=etcd3 --requestheader-username-headers=X-Remote-User --bind-address=0.0.0.0 --authorization-mode=Node,RBAC --admission-control-config-file=/etc/kubernetes/admission.yaml --service-node-port-range=30000-32767 --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --service-account-issuer=rke --allow-privileged=true --service-account-lookup=true --audit-log-maxbackup=10 --audit-policy-file=/etc/kubernetes/audit-policy.yaml --proxy-client-cert-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client.pem --service-cluster-ip-range=10.43.0.0/16\n")),(0,n.kt)("h3",{id:"322-ensure-that-the-audit-policy-covers-key-security-concerns-manual"},"3.2.2 Ensure that the audit policy covers key security concerns (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nReview the audit policy provided for the cluster and ensure that it covers\nat least the following areas,"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Access to Secrets managed by the cluster. Care should be taken to only\nlog Metadata for requests to Secrets, ConfigMaps, and TokenReviews, in\norder to avoid risk of logging sensitive data."),(0,n.kt)("li",{parentName:"ul"},"Modification of Pod and Deployment objects."),(0,n.kt)("li",{parentName:"ul"},"Use of ",(0,n.kt)("inlineCode",{parentName:"li"},"pods/exec"),", ",(0,n.kt)("inlineCode",{parentName:"li"},"pods/portforward"),", ",(0,n.kt)("inlineCode",{parentName:"li"},"pods/proxy")," and ",(0,n.kt)("inlineCode",{parentName:"li"},"services/proxy"),".\nFor most requests, minimally logging at the Metadata level is recommended\n(the most basic level of logging).")),(0,n.kt)("h2",{id:"41-worker-node-configuration-files"},"4.1 Worker Node Configuration Files"),(0,n.kt)("h3",{id:"411-ensure-that-the-kubelet-service-file-permissions-are-set-to-644-or-more-restrictive-automated"},"4.1.1 Ensure that the kubelet service file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn\u2019t require or maintain a configuration file for the kubelet service.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"412-ensure-that-the-kubelet-service-file-ownership-is-set-to-rootroot-automated"},"4.1.2 Ensure that the kubelet service file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCluster provisioned by RKE doesn\u2019t require or maintain a configuration file for the kubelet service.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"413-if-proxy-kubeconfig-file-exists-ensure-permissions-are-set-to-644-or-more-restrictive-automated"},"4.1.3 If proxy kubeconfig file exists ensure permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the each worker node.\nFor example,\nchmod 644 /etc/kubernetes/ssl/kubecfg-kube-proxy.yaml"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /node/etc/kubernetes/ssl/kubecfg-kube-proxy.yaml; then stat -c permissions=%a /node/etc/kubernetes/ssl/kubecfg-kube-proxy.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"permissions has permissions 600, expected 644 or more restrictive OR '/etc/kubernetes/ssl/kubecfg-kube-proxy.yaml' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"permissions=600\n")),(0,n.kt)("h3",{id:"414-if-proxy-kubeconfig-file-exists-ensure-ownership-is-set-to-rootroot-automated"},"4.1.4 If proxy kubeconfig file exists ensure ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the each worker node.\nFor example, chown root:root /etc/kubernetes/ssl/kubecfg-kube-proxy.yaml"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /etc/kubernetes/ssl/kubecfg-kube-proxy.yaml; then stat -c %U:%G /etc/kubernetes/ssl/kubecfg-kube-proxy.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'root:root' is present OR '/etc/kubernetes/ssl/kubecfg-kube-proxy.yaml' is not present\n")),(0,n.kt)("h3",{id:"415-ensure-that-the---kubeconfig-kubeletconf-file-permissions-are-set-to-644-or-more-restrictive-automated"},"4.1.5 Ensure that the --kubeconfig kubelet.conf file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the each worker node.\nFor example,\nchmod 644 /etc/kubernetes/ssl/kubecfg-kube-node.yaml"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /node/etc/kubernetes/ssl/kubecfg-kube-node.yaml; then stat -c permissions=%a /node/etc/kubernetes/ssl/kubecfg-kube-node.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"permissions has permissions 600, expected 644 or more restrictive\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"permissions=600\n")),(0,n.kt)("h3",{id:"416-ensure-that-the---kubeconfig-kubeletconf-file-ownership-is-set-to-rootroot-automated"},"4.1.6 Ensure that the --kubeconfig kubelet.conf file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the below command (based on the file location on your system) on the each worker node.\nFor example,\nchown root:root /etc/kubernetes/ssl/kubecfg-kube-node.yaml"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /node/etc/kubernetes/ssl/kubecfg-kube-node.yaml; then stat -c %U:%G /node/etc/kubernetes/ssl/kubecfg-kube-node.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'root:root' is equal to 'root:root'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root:root\n")),(0,n.kt)("h3",{id:"417-ensure-that-the-certificate-authorities-file-permissions-are-set-to-644-or-more-restrictive-automated"},"4.1.7 Ensure that the certificate authorities file permissions are set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the following command to modify the file permissions of the\n--client-ca-file chmod 644 <filename",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"stat -c permissions=%a /node/etc/kubernetes/ssl/kube-ca.pem\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"permissions has permissions 644, expected 644 or more restrictive\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"permissions=644\n")),(0,n.kt)("h3",{id:"418-ensure-that-the-client-certificate-authorities-file-ownership-is-set-to-rootroot-automated"},"4.1.8 Ensure that the client certificate authorities file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the following command to modify the ownership of the --client-ca-file.\nchown root:root <filename",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"stat -c %U:%G /node/etc/kubernetes/ssl/kube-ca.pem\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'root:root' is equal to 'root:root'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"root:root\n")),(0,n.kt)("h3",{id:"419-ensure-that-the-kubelet---config-configuration-file-has-permissions-set-to-644-or-more-restrictive-automated"},"4.1.9 Ensure that the kubelet --config configuration file has permissions set to 644 or more restrictive (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the following command (using the config file location identified in the Audit step)\nchmod 644 /var/lib/kubelet/config.yaml"),(0,n.kt)("p",null,"Clusters provisioned by RKE doesn\u2019t require or maintain a configuration file for the kubelet.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h3",{id:"4110-ensure-that-the-kubelet---config-configuration-file-ownership-is-set-to-rootroot-automated"},"4.1.10 Ensure that the kubelet --config configuration file ownership is set to root:root (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRun the following command (using the config file location identified in the Audit step)\nchown root:root /var/lib/kubelet/config.yaml"),(0,n.kt)("p",null,"Clusters provisioned by RKE doesn\u2019t require or maintain a configuration file for the kubelet.\nAll configuration is passed in as arguments at container run time."),(0,n.kt)("h2",{id:"42-kubelet"},"4.2 Kubelet"),(0,n.kt)("h3",{id:"421-ensure-that-the---anonymous-auth-argument-is-set-to-false-automated"},"4.2.1 Ensure that the --anonymous-auth argument is set to false (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"authentication: anonymous: enabled")," to\n",(0,n.kt)("inlineCode",{parentName:"p"},"false"),".\nIf using executable arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameter in KUBELET_SYSTEM_PODS_ARGS variable.\n",(0,n.kt)("inlineCode",{parentName:"p"},"--anonymous-auth=false"),"\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--anonymous-auth' is equal to 'false'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"422-ensure-that-the---authorization-mode-argument-is-not-set-to-alwaysallow-automated"},"4.2.2 Ensure that the --authorization-mode argument is not set to AlwaysAllow (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"authorization.mode")," to Webhook. If\nusing executable arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameter in KUBELET_AUTHZ_ARGS variable.\n--authorization-mode=Webhook\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--authorization-mode' does not have 'AlwaysAllow'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"423-ensure-that-the---client-ca-file-argument-is-set-as-appropriate-automated"},"4.2.3 Ensure that the --client-ca-file argument is set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"authentication.x509.clientCAFile")," to\nthe location of the client CA file.\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameter in KUBELET_AUTHZ_ARGS variable.\n--client-ca-file=<path/to/client-ca-file",">","\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--client-ca-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"424-ensure-that-the---read-only-port-argument-is-set-to-0-automated"},"4.2.4 Ensure that the --read-only-port argument is set to 0 (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"readOnlyPort")," to 0.\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameter in KUBELET_SYSTEM_PODS_ARGS variable.\n--read-only-port=0\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--read-only-port' is equal to '0' OR '--read-only-port' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"425-ensure-that-the---streaming-connection-idle-timeout-argument-is-not-set-to-0-manual"},"4.2.5 Ensure that the --streaming-connection-idle-timeout argument is not set to 0 (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"streamingConnectionIdleTimeout")," to a\nvalue other than 0.\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameter in KUBELET_SYSTEM_PODS_ARGS variable.\n--streaming-connection-idle-timeout=5m\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--streaming-connection-idle-timeout' is not equal to '0' OR '--streaming-connection-idle-timeout' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"426-ensure-that-the---protect-kernel-defaults-argument-is-set-to-true-automated"},"4.2.6 Ensure that the --protect-kernel-defaults argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"protectKernelDefaults")," to ",(0,n.kt)("inlineCode",{parentName:"p"},"true"),".\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameter in KUBELET_SYSTEM_PODS_ARGS variable.\n--protect-kernel-defaults=true\nBased on your system, restart the kubelet service. For example:\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--protect-kernel-defaults' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"427-ensure-that-the---make-iptables-util-chains-argument-is-set-to-true-automated"},"4.2.7 Ensure that the --make-iptables-util-chains argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"makeIPTablesUtilChains")," to ",(0,n.kt)("inlineCode",{parentName:"p"},"true"),".\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nremove the --make-iptables-util-chains argument from the\nKUBELET_SYSTEM_PODS_ARGS variable.\nBased on your system, restart the kubelet service. For example:\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--make-iptables-util-chains' is equal to 'true' OR '--make-iptables-util-chains' is not present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"428-ensure-that-the---hostname-override-argument-is-not-set-manual"},"4.2.8 Ensure that the --hostname-override argument is not set (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the kubelet service file /etc/systemd/system/kubelet.service.d/10-kubeadm.conf\non each worker node and remove the --hostname-override argument from the\nKUBELET_SYSTEM_PODS_ARGS variable.\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,"Clusters provisioned by RKE set the --hostname-override to avoid any hostname configuration errors"),(0,n.kt)("h3",{id:"429-ensure-that-the---event-qps-argument-is-set-to-0-or-a-level-which-ensures-appropriate-event-capture-manual"},"4.2.9 Ensure that the --event-qps argument is set to 0 or a level which ensures appropriate event capture (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"eventRecordQPS")," to an appropriate level.\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameter in KUBELET_SYSTEM_PODS_ARGS variable.\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--event-qps' is equal to '0'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"4210-ensure-that-the---tls-cert-file-and---tls-private-key-file-arguments-are-set-as-appropriate-automated"},"4.2.10 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"tlsCertFile")," to the location\nof the certificate file to use to identify this Kubelet, and ",(0,n.kt)("inlineCode",{parentName:"p"},"tlsPrivateKeyFile"),"\nto the location of the corresponding private key file.\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the below parameters in KUBELET_CERTIFICATE_ARGS variable.\n--tls-cert-file=<path/to/tls-certificate-file",">","\n--tls-private-key-file=<path/to/tls-key-file",">","\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--tls-cert-file' is present AND '--tls-private-key-file' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h3",{id:"4211-ensure-that-the---rotate-certificates-argument-is-not-set-to-false-automated"},"4.2.11 Ensure that the --rotate-certificates argument is not set to false (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to add the line ",(0,n.kt)("inlineCode",{parentName:"p"},"rotateCertificates")," to ",(0,n.kt)("inlineCode",{parentName:"p"},"true")," or\nremove it altogether to use the default value.\nIf using command line arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nremove --rotate-certificates=false argument from the KUBELET_CERTIFICATE_ARGS\nvariable.\nBased on your system, restart the kubelet service. For example,\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'{.rotateCertificates}' is present OR '{.rotateCertificates}' is not present\n")),(0,n.kt)("h3",{id:"4212-verify-that-the-rotatekubeletservercertificate-argument-is-set-to-true-automated"},"4.2.12 Verify that the RotateKubeletServerCertificate argument is set to true (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," Not Applicable"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEdit the kubelet service file /etc/systemd/system/kubelet.service.d/10-kubeadm.conf\non each worker node and set the below parameter in KUBELET_CERTIFICATE_ARGS variable.\n--feature-gates=RotateKubeletServerCertificate=true\nBased on your system, restart the kubelet service. For example:\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,"Clusters provisioned by RKE handles certificate rotation directly through RKE."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("h3",{id:"4213-ensure-that-the-kubelet-only-makes-use-of-strong-cryptographic-ciphers-automated"},"4.2.13 Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf using a Kubelet config file, edit the file to set ",(0,n.kt)("inlineCode",{parentName:"p"},"TLSCipherSuites")," to\nTLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256\nor to a subset of these values.\nIf using executable arguments, edit the kubelet service file\n/etc/systemd/system/kubelet.service.d/10-kubeadm.conf on each worker node and\nset the --tls-cipher-suites parameter as follows, or to a subset of these values.\n--tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256\nBased on your system, restart the kubelet service. For example:\nsystemctl daemon-reload\nsystemctl restart kubelet.service"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/ps -fC kubelet\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Config:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"/bin/sh -c 'if test -e /var/lib/kubelet/config.yaml; then /bin/cat /var/lib/kubelet/config.yaml; fi'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'--tls-cipher-suites' contains valid elements from 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"UID PID PPID C STIME TTY TIME CMD root 5730 5709 4 21:34 ? 00:00:08 kubelet --pod-infra-container-image=rancher/mirrored-pause:3.6 --network-plugin=cni --protect-kernel-defaults=true --fail-swap-on=false --hostname-override=ip-172-31-26-226 --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cni-conf-dir=/etc/cni/net.d --anonymous-auth=false --streaming-connection-idle-timeout=30m --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --cloud-provider= --cluster-domain=cluster.local --resolv-conf=/etc/resolv.conf --make-iptables-util-chains=true --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --root-dir=/var/lib/kubelet --read-only-port=0 --v=2 --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --feature-gates=RotateKubeletServerCertificate=true --cgroups-per-qos=True --cluster-dns=10.43.0.10 --cni-bin-dir=/opt/cni/bin --address=0.0.0.0 --node-ip=172.31.26.226 --tls-cert-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226.pem --tls-private-key-file=/etc/kubernetes/ssl/kube-kubelet-172-31-26-226-key.pem --event-qps=0 --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --resolv-conf=/run/systemd/resolve/resolv.conf\n")),(0,n.kt)("h2",{id:"51-rbac-and-service-accounts"},"5.1 RBAC and Service Accounts"),(0,n.kt)("h3",{id:"511-ensure-that-the-cluster-admin-role-is-only-used-where-required-manual"},"5.1.1 Ensure that the cluster-admin role is only used where required (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIdentify all clusterrolebindings to the cluster-admin role. Check if they are used and\nif they need this role or if they could use a role with fewer privileges.\nWhere possible, first bind users to a lower privileged role and then remove the\nclusterrolebinding to the cluster-admin role :\nkubectl delete clusterrolebinding ","[name]"),(0,n.kt)("h3",{id:"512-minimize-access-to-secrets-manual"},"5.1.2 Minimize access to secrets (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nWhere possible, remove get, list and watch access to Secret objects in the cluster."),(0,n.kt)("h3",{id:"513-minimize-wildcard-use-in-roles-and-clusterroles-manual"},"5.1.3 Minimize wildcard use in Roles and ClusterRoles (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nWhere possible replace any use of wildcards in clusterroles and roles with specific\nobjects or actions."),(0,n.kt)("h3",{id:"514-minimize-access-to-create-pods-manual"},"5.1.4 Minimize access to create pods (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nWhere possible, remove create access to pod objects in the cluster."),(0,n.kt)("h3",{id:"515-ensure-that-default-service-accounts-are-not-actively-used-automated"},"5.1.5 Ensure that default service accounts are not actively used. (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCreate explicit service accounts wherever a Kubernetes workload requires specific access\nto the Kubernetes API server.\nModify the configuration of each default service account to include this value\nautomountServiceAccountToken: false"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Script:")," ",(0,n.kt)("inlineCode",{parentName:"p"},"check_for_default_sa.sh")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},'#!/bin/bash\n\nset -eE\n\nhandle_error() {\n echo "false"\n}\n\ntrap \'handle_error\' ERR\n\ncount_sa=$(kubectl get serviceaccounts --all-namespaces -o json | jq -r \'.items[] | select(.metadata.name=="default") | select((.automountServiceAccountToken == null) or (.automountServiceAccountToken == true))\' | jq .metadata.namespace | wc -l)\nif [[ ${count_sa} -gt 0 ]]; then\n echo "false"\n exit\nfi\n\nfor ns in $(kubectl get ns --no-headers -o custom-columns=":metadata.name")\ndo\n for result in $(kubectl get clusterrolebinding,rolebinding -n $ns -o json | jq -r \'.items[] | select((.subjects[].kind=="ServiceAccount" and .subjects[].name=="default") or (.subjects[].kind=="Group" and .subjects[].name=="system:serviceaccounts"))\' | jq -r \'"\\(.roleRef.kind),\\(.roleRef.name)"\')\n do\n read kind name <<<$(IFS=","; echo $result)\n resource_count=$(kubectl get $kind $name -n $ns -o json | jq -r \'.rules[] | select(.resources[] != "podsecuritypolicies")\' | wc -l)\n if [[ ${resource_count} -gt 0 ]]; then\n echo "false"\n exit\n fi\n done\ndone\n\n\necho "true"\n')),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Execution:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"./check_for_default_sa.sh \n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'true' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},'Error from server (Forbidden): serviceaccounts is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "serviceaccounts" in API group "" at the cluster scope Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "cattle-fleet-system" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "cattle-impersonation-system" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "cattle-system" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "cis-operator-system" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "default" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "ingress-nginx" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "kube-node-lease" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "kube-public" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "kube-system" Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope Error from server (Forbidden): rolebindings.rbac.authorization.k8s.io is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "local" true\n')),(0,n.kt)("h3",{id:"516-ensure-that-service-account-tokens-are-only-mounted-where-necessary-manual"},"5.1.6 Ensure that Service Account Tokens are only mounted where necessary (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nModify the definition of pods and service accounts which do not need to mount service\naccount tokens to disable it."),(0,n.kt)("h3",{id:"517-avoid-use-of-systemmasters-group-manual"},"5.1.7 Avoid use of system:masters group (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRemove the system:masters group from all users in the cluster."),(0,n.kt)("h3",{id:"518-limit-use-of-the-bind-impersonate-and-escalate-permissions-in-the-kubernetes-cluster-manual"},"5.1.8 Limit use of the Bind, Impersonate and Escalate permissions in the Kubernetes cluster (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nWhere possible, remove the impersonate, bind and escalate rights from subjects."),(0,n.kt)("h2",{id:"52-pod-security-standards"},"5.2 Pod Security Standards"),(0,n.kt)("h3",{id:"521-ensure-that-the-cluster-has-at-least-one-active-policy-control-mechanism-in-place-manual"},"5.2.1 Ensure that the cluster has at least one active policy control mechanism in place (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEnsure that either Pod Security Admission or an external policy control system is in place\nfor every namespace which contains user workloads."),(0,n.kt)("h3",{id:"522-minimize-the-admission-of-privileged-containers-manual"},"5.2.2 Minimize the admission of privileged containers (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of privileged containers."),(0,n.kt)("h3",{id:"523-minimize-the-admission-of-containers-wishing-to-share-the-host-process-id-namespace-automated"},"5.2.3 Minimize the admission of containers wishing to share the host process ID namespace (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of ",(0,n.kt)("inlineCode",{parentName:"p"},"hostPID")," containers."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl get psp -o json | jq .items[] | jq -r 'select((.spec.hostPID == null) or (.spec.hostPID == false))' | jq .metadata.name | wc -l | xargs -I {} echo '--count={}'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'count' is greater than 0\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"--count=1\n")),(0,n.kt)("h3",{id:"524-minimize-the-admission-of-containers-wishing-to-share-the-host-ipc-namespace-automated"},"5.2.4 Minimize the admission of containers wishing to share the host IPC namespace (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of ",(0,n.kt)("inlineCode",{parentName:"p"},"hostIPC")," containers."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl get psp -o json | jq .items[] | jq -r 'select((.spec.hostIPC == null) or (.spec.hostIPC == false))' | jq .metadata.name | wc -l | xargs -I {} echo '--count={}'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'count' is greater than 0\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"--count=1\n")),(0,n.kt)("h3",{id:"525-minimize-the-admission-of-containers-wishing-to-share-the-host-network-namespace-automated"},"5.2.5 Minimize the admission of containers wishing to share the host network namespace (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of ",(0,n.kt)("inlineCode",{parentName:"p"},"hostNetwork")," containers."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl get psp -o json | jq .items[] | jq -r 'select((.spec.hostNetwork == null) or (.spec.hostNetwork == false))' | jq .metadata.name | wc -l | xargs -I {} echo '--count={}'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'count' is greater than 0\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"--count=1\n")),(0,n.kt)("h3",{id:"526-minimize-the-admission-of-containers-with-allowprivilegeescalation-automated"},"5.2.6 Minimize the admission of containers with allowPrivilegeEscalation (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of containers with ",(0,n.kt)("inlineCode",{parentName:"p"},".spec.allowPrivilegeEscalation")," set to ",(0,n.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl get psp -o json | jq .items[] | jq -r 'select((.spec.allowPrivilegeEscalation == null) or (.spec.allowPrivilegeEscalation == false))' | jq .metadata.name | wc -l | xargs -I {} echo '--count={}'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'count' is greater than 0\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"--count=1\n")),(0,n.kt)("h3",{id:"527-minimize-the-admission-of-root-containers-automated"},"5.2.7 Minimize the admission of root containers (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nCreate a policy for each namespace in the cluster, ensuring that either ",(0,n.kt)("inlineCode",{parentName:"p"},"MustRunAsNonRoot"),"\nor ",(0,n.kt)("inlineCode",{parentName:"p"},"MustRunAs")," with the range of UIDs not including 0, is set."),(0,n.kt)("h3",{id:"528-minimize-the-admission-of-containers-with-the-net_raw-capability-automated"},"5.2.8 Minimize the admission of containers with the NET_RAW capability (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of containers with the ",(0,n.kt)("inlineCode",{parentName:"p"},"NET_RAW")," capability."),(0,n.kt)("h3",{id:"529-minimize-the-admission-of-containers-with-added-capabilities-automated"},"5.2.9 Minimize the admission of containers with added capabilities (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEnsure that ",(0,n.kt)("inlineCode",{parentName:"p"},"allowedCapabilities")," is not present in policies for the cluster unless\nit is set to an empty array."),(0,n.kt)("h3",{id:"5210-minimize-the-admission-of-containers-with-capabilities-assigned-manual"},"5.2.10 Minimize the admission of containers with capabilities assigned (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nReview the use of capabilites in applications running on your cluster. Where a namespace\ncontains applicaions which do not require any Linux capabities to operate consider adding\na PSP which forbids the admission of containers which do not drop all capabilities."),(0,n.kt)("h3",{id:"5211-minimize-the-admission-of-windows-hostprocess-containers-manual"},"5.2.11 Minimize the admission of Windows HostProcess containers (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of containers that have ",(0,n.kt)("inlineCode",{parentName:"p"},".securityContext.windowsOptions.hostProcess")," set to ",(0,n.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,n.kt)("h3",{id:"5212-minimize-the-admission-of-hostpath-volumes-manual"},"5.2.12 Minimize the admission of HostPath volumes (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of containers with ",(0,n.kt)("inlineCode",{parentName:"p"},"hostPath")," volumes."),(0,n.kt)("h3",{id:"5213-minimize-the-admission-of-containers-which-use-hostports-manual"},"5.2.13 Minimize the admission of containers which use HostPorts (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nAdd policies to each namespace in the cluster which has user workloads to restrict the\nadmission of containers which use ",(0,n.kt)("inlineCode",{parentName:"p"},"hostPort")," sections."),(0,n.kt)("h2",{id:"53-network-policies-and-cni"},"5.3 Network Policies and CNI"),(0,n.kt)("h3",{id:"531-ensure-that-the-cni-in-use-supports-networkpolicies-manual"},"5.3.1 Ensure that the CNI in use supports NetworkPolicies (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf the CNI plugin in use does not support network policies, consideration should be given to\nmaking use of a different plugin, or finding an alternate mechanism for restricting traffic\nin the Kubernetes cluster."),(0,n.kt)("h3",{id:"532-ensure-that-all-namespaces-have-network-policies-defined-automated"},"5.3.2 Ensure that all Namespaces have Network Policies defined (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the documentation and create NetworkPolicy objects as you need them."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Script:")," ",(0,n.kt)("inlineCode",{parentName:"p"},"check_for_network_policies.sh")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"#!/bin/bash\n\nset -eE\n\nhandle_error() {\n echo \"false\"\n}\n\ntrap 'handle_error' ERR\n\nfor namespace in $(kubectl get namespaces --all-namespaces -o json | jq -r '.items[].metadata.name'); do\n policy_count=$(kubectl get networkpolicy -n ${namespace} -o json | jq '.items | length')\n if [[ ${policy_count} -eq 0 ]]; then\n echo \"false\"\n exit\n fi\ndone\n\necho \"true\"\n\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Execution:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"./check_for_network_policies.sh \n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'true' is present\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"true\n")),(0,n.kt)("h2",{id:"54-secrets-management"},"5.4 Secrets Management"),(0,n.kt)("h3",{id:"541-prefer-using-secrets-as-files-over-secrets-as-environment-variables-manual"},"5.4.1 Prefer using Secrets as files over Secrets as environment variables (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nIf possible, rewrite application code to read Secrets from mounted secret files, rather than\nfrom environment variables."),(0,n.kt)("h3",{id:"542-consider-external-secret-storage-manual"},"5.4.2 Consider external secret storage (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nRefer to the Secrets management options offered by your cloud provider or a third-party\nsecrets management solution."),(0,n.kt)("h2",{id:"55-extensible-admission-control"},"5.5 Extensible Admission Control"),(0,n.kt)("h3",{id:"551-configure-image-provenance-using-imagepolicywebhook-admission-controller-manual"},"5.5.1 Configure Image Provenance using ImagePolicyWebhook admission controller (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and setup image provenance."),(0,n.kt)("h2",{id:"57-general-policies"},"5.7 General Policies"),(0,n.kt)("h3",{id:"571-create-administrative-boundaries-between-resources-using-namespaces-manual"},"5.7.1 Create administrative boundaries between resources using namespaces (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the documentation and create namespaces for objects in your deployment as you need\nthem."),(0,n.kt)("h3",{id:"572-ensure-that-the-seccomp-profile-is-set-to-dockerdefault-in-your-pod-definitions-manual"},"5.7.2 Ensure that the seccomp profile is set to docker/default in your Pod definitions (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nUse ",(0,n.kt)("inlineCode",{parentName:"p"},"securityContext")," to enable the docker/default seccomp profile in your pod definitions.\nAn example is as below:\nsecurityContext:\nseccompProfile:\ntype: RuntimeDefault"),(0,n.kt)("h3",{id:"573-apply-securitycontext-to-your-pods-and-containers-manual"},"5.7.3 Apply SecurityContext to your Pods and Containers (Manual)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," warn"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nFollow the Kubernetes documentation and apply SecurityContexts to your Pods. For a\nsuggested list of SecurityContexts, you may refer to the CIS Security Benchmark for Docker\nContainers."),(0,n.kt)("h3",{id:"574-the-default-namespace-should-not-be-used-automated"},"5.7.4 The default namespace should not be used (Automated)"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Result:")," pass"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remediation:"),"\nEnsure that namespaces are created to allow for appropriate segregation of Kubernetes\nresources and that all new resources are created in a specific namespace."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Script:")," ",(0,n.kt)("inlineCode",{parentName:"p"},"check_for_default_ns.sh")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},'#!/bin/bash\n\nset -eE\n\nhandle_error() {\n echo "false"\n}\n\ntrap \'handle_error\' ERR\n\ncount=$(kubectl get all -n default -o json | jq .items[] | jq -r \'select((.metadata.name!="kubernetes"))\' | jq .metadata.name | wc -l)\nif [[ ${count} -gt 0 ]]; then\n echo "false"\n exit\nfi\n\necho "true"\n\n\n')),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Audit Execution:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"./check_for_default_ns.sh \n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Expected Result"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"'true' is equal to 'true'\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returned Value"),":"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},'Error from server (Forbidden): replicationcontrollers is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "replicationcontrollers" in API group "" in the namespace "default" Error from server (Forbidden): services is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "services" in API group "" in the namespace "default" Error from server (Forbidden): daemonsets.apps is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "daemonsets" in API group "apps" in the namespace "default" Error from server (Forbidden): deployments.apps is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "deployments" in API group "apps" in the namespace "default" Error from server (Forbidden): replicasets.apps is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "replicasets" in API group "apps" in the namespace "default" Error from server (Forbidden): statefulsets.apps is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "statefulsets" in API group "apps" in the namespace "default" Error from server (Forbidden): horizontalpodautoscalers.autoscaling is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "horizontalpodautoscalers" in API group "autoscaling" in the namespace "default" Error from server (Forbidden): cronjobs.batch is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "cronjobs" in API group "batch" in the namespace "default" Error from server (Forbidden): jobs.batch is forbidden: User "system:serviceaccount:cis-operator-system:cis-serviceaccount" cannot list resource "jobs" in API group "batch" in the namespace "default" true\n')))}p.isMDXComponent=!0}}]); |