Red Hat OpenShift
TMA-OPENSHIFT-4.2.2
Ensure that the --anonymous-auth argument is set to false
심각레벨 1자동openshift
설명
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.
점검 방법
감사 방식: 셸 명령
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- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
Create a kubeletconfig to explicitly disable anonymous authentication. Examples of how to do this can be found in the OpenShift documentation.
속성
- 운영 체제
- 모두
- 태그
- openshiftworker-node
- 참고 자료
- CIS Red Hat OpenShift Container Platform Benchmark v2.0.0 - 4.2.2 Ensure that the --anonymous-auth argument is set to false
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
shell
tmaegis scan --target openshift