Red Hat OpenShift
TMA-OPENSHIFT-4.2.3
Ensure that the --authorization-mode argument is not set to AlwaysAllow
KritischStufe 1Automatisiertopenshift
Beschreibung
Do not allow all requests. Enable explicit authorization. Reads every node's effective kubelet configuration with oc get --raw /api/v1/nodes/<node>/proxy/configz; requires a cluster-admin oc login.
So wird geprüft
Prüfmethode: Shell-Befehl
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 '"authorization":\{"mode":"AlwaysAllow"' && printf '%s' "$c" | grep -Eq '"authorization":\{"mode":"'; }; then echo "noncompliant: $n"; ok=0; fi
done
if [ "$ok" -eq 1 ]; then echo compliant; fi- Erwartete Ausgabe
compliant
So wird behoben
Behebungsmethode: Anleitung oder Infrastruktur-Patch
Set authorization.mode to 'Webhook'
Eigenschaften
- Betriebssysteme
- Beliebig
- Tags
- openshiftworker-node
- Referenz
- CIS Red Hat OpenShift Container Platform Benchmark v2.0.0 - 4.2.3 Ensure that the --authorization-mode argument is not set to AlwaysAllow
Diesen Host prüfen
Führen Sie dies auf einem Rechner aus, den Sie prüfen dürfen. Der Scan ist schreibgeschützt.
shell
tmaegis scan --target openshift