TMAegis
Više pravila za openshift

TMA-OPENSHIFT-4.2.2

Ensure that the --anonymous-auth argument is set to false

KritičnaNivo 1Automatskaopenshift

Opis

Disable anonymous requests to the Kubelet server. Reads every node's effective kubelet configuration with oc get --raw /api/v1/nodes/<node>/proxy/configz; requires a cluster-admin oc login.

Kako se proverava

Metod provere: Komanda ljuske

shell
nodes=$(oc get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}') || exit 1
[ -n "$nodes" ] || exit 1
ok=1
for n in $nodes; do
  c=$(oc get --raw "/api/v1/nodes/$n/proxy/configz") || exit 1
  if ! { printf '%s' "$c" | grep -Eq '"anonymous":\{"enabled":false\}'; }; then echo "noncompliant: $n"; ok=0; fi
done
if [ "$ok" -eq 1 ]; then echo compliant; fi
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

Create a kubeletconfig to explicitly disable anonymous authentication. Examples of how to do this can be found in the OpenShift documentation.

Svojstva

Operativni sistemi
Bilo koji
Oznake
openshiftworker-node
Referenca
CIS Red Hat OpenShift Container Platform Benchmark v2.0.0 - 4.2.2 Ensure that the --anonymous-auth argument is set to false

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target openshift