documentation_complete: true


title: 'Verify Permissions on the OpenShift Admin Kubeconfig File'

description: |-
    {{{ describe_file_permissions(file="/etc/kubernetes/kubeconfig", perms="0600") }}}

rationale: |-
    If the <tt>/etc/kubernetes/kubeconfig</tt> file is writable by a group-owner or the
    world the risk of its compromise is increased. The file contains the administration configuration of the
    OpenShift cluster that is configured on the system. Protection of this file is
    critical for OpenShift security.

severity: medium

#identifiers:
#    cce@ocp4: 80633-1

references:
    cis@ocp4: 1.1.13

ocil_clause: '{{{ ocil_clause_file_permissions(file="/etc/kubernetes/kubeconfig", perms="-rw-------") }}}'

ocil: |-
    {{{ ocil_file_permissions(file="/etc/kubernetes/kubeconfig", perms="-rw-------") }}}

#template:
#    name: file_permissions
#    vars:
#        filepath: /etc/kubernetes/kubeconfig
#        filemode: '0600'
