documentation_complete: true


platform: ocp4-node

title: 'Verify Permissions on the OpenShift Node Service File'

description: |-
    {{{ describe_file_permissions(file="/etc/systemd/system/kubelet.service", perms="0644") }}}

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

severity: medium

identifiers:
    cce@ocp4: CCE-83455-6

references:
    cis@ocp4: 4.1.1
    nerc-cip: CIP-003-8 R6,CIP-004-6 R3,CIP-007-3 R6.1
    nist: CM-6,CM-6(1)
    srg: SRG-APP-000516-CTR-001325

ocil_clause: |-
  {{{ ocil_clause_file_permissions(file="/etc/systemd/system/kubelet.service", perms="-rw-r--r--") }}}

ocil: |-
  {{{ ocil_file_permissions(file="/etc/systemd/system/kubelet.service", perms="-rw-r--r--") }}}

template:
    name: file_permissions
    vars:
        filepath: /etc/systemd/system/kubelet.service
        filemode: '0644'
