| name | cis-ocp-v160-1.2.3 |
| description | Ensure that the --token-auth-file parameter is not set (Manual) |
| category | cis-openshift |
| version | 1.6.0 |
| author | cyberstrike-official |
| tags | ["cis","openshift","kubernetes","redhat","control-plane","api-server","token-auth"] |
| cis_id | 1.2.3 |
| cis_benchmark | CIS Red Hat OpenShift Container Platform Benchmark v1.6.0 |
| tech_stack | ["kubernetes","openshift","redhat"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
CIS Red Hat OpenShift Container Platform Benchmark v1.6.0 - Control 1.2.3
Profile Applicability
Description
Do not use token based authentication.
Rationale
The token-based authentication utilizes static tokens to authenticate requests to the apiserver. The tokens are stored in clear-text in a file on the apiserver, and cannot be revoked or rotated without restarting the apiserver. Hence, do not use static token-based authentication.
Impact
OpenShift does not use the token-auth-file flag. OpenShift includes a built-in OAuth server rather than relying on a static token file. The OAuth server is integrated with the API server.
Audit Procedure
OpenShift does not use the token-auth-file flag. OpenShift includes a built-in OAuth server rather than relying on a static token file. Authentication is managed by the OpenShift authentication-operator. To verify that the token-auth-file flag is not present and that the authentication-operator is running, run the following commands:
oc get configmap config -n openshift-kube-apiserver -ojson | jq -r '.data["config.yaml"]' | jq '.apiServerArguments'
oc get configmap config -n openshift-apiserver -ojson | jq -r '.data["config.yaml"]' | jq '.apiServerArguments'
oc get kubeapiservers.operator.openshift.io cluster -o json | jq '.spec.observedConfig.apiServerArguments'
oc get clusteroperator authentication
Verify that the --token-auth-file argument does not exist.
Verify that the authentication-operator is running: Available is True.
Remediation
None is required.
Default Value
By default, --token-auth-file argument is not set and OAuth authentication is configured.
References
- https://docs.openshift.com/container-platform/4.5/authentication/configuring-internal-oauth.html
- https://docs.openshift.com/container-platform/4.5/authentication/understanding-authentication.html