1.1.24 Ensure that the --service-account-lookup argument is set to true

Information

Validate service account before validating token.

Rationale:

By default, the apiserver only verifies that the authentication token is valid. However, it does not validate that the service account token mentioned in the request is actually present in etcd. This allows using a service account token even after the corresponding service account is deleted. This is an example of time of check to time of use security issue.

Solution

Edit the `/etc/kubernetes/apiserver` file on the master node and set the `KUBE_API_ARGS` parameter to `'--service-account-lookup=true'`: `KUBE_API_ARGS='--service-account-lookup=true'`

Based on your system, restart the `kube-apiserver` service. For example: `systemctl restart kube-apiserver.service`

Impact:

None

See Also

https://workbench.cisecurity.org/files/1738

Item Details

Category: IDENTIFICATION AND AUTHENTICATION

References: 800-53|IA-5(13), CSCv6|16

Plugin: Unix

Control ID: 92dc1818ed06c76b064a4fff4bae6c29411fad53ec54e71c12dd889a142a4b61