SV-257508r1043176_rule
V-257508
SRG-APP-000023-CTR-000055
CNTR-OS-000040
CAT II
10
If an alternative IDP is already configured and an administrative user exists with the role of cluster-admin, disable the kubeadmin account by running the following command as a cluster administrator:
oc delete secrets kubeadmin -n kube-system
Verify the kubeadmin account is disabled by executing the following:
oc get secrets kubeadmin -n kube-system
If the command returns an error, the secret was not found, and this is not a finding.
(Example output:
Error from server (NotFound): secrets "kubeadmin" not found)
If the command returns a listing that includes the kubeadmin secret, its type, the data count, and age, this is a finding.
(Example Output for not a finding:
NAME TYPE DATA AGE
kubeadmin Opaque 1 6h3m)
V-257508
False
CNTR-OS-000040
Verify the kubeadmin account is disabled by executing the following:
oc get secrets kubeadmin -n kube-system
If the command returns an error, the secret was not found, and this is not a finding.
(Example output:
Error from server (NotFound): secrets "kubeadmin" not found)
If the command returns a listing that includes the kubeadmin secret, its type, the data count, and age, this is a finding.
(Example Output for not a finding:
NAME TYPE DATA AGE
kubeadmin Opaque 1 6h3m)
M
5547