
title: 'Enable Classification Banner on OpenShift Console'

description: |-
    A classification banner can be configured by creating a Console Notification CR on OpenShift

rationale: |-
    Displays to users organization-defined system use notification message or banner before granting
    access to the system that provides privacy and security notices consistent with applicable federal laws

identifiers:
    cce@ocp4: CCE-84197-3

severity: medium

references:
    nist: AC-8
    srg: SRG-APP-000068-CTR-000120

ocil_clause: 'classification banner is not set'

ocil: |-
  Verify that a <tt>ConsoleNotification</tt> object called
  <tt>classification-banner</tt> exists and contains an appropriate
  legal notice.

warnings:
- general: |-
    {{{ openshift_cluster_setting("/apis/console.openshift.io/v1/consolenotifications/classification-banner") | indent(4) }}}

template:
  name: yamlfile_value
  vars:
    ocp_data: "true"
    entity_check: "at least one"
    filepath: /apis/console.openshift.io/v1/consolenotifications/classification-banner
    yamlpath: ".spec.text"
    values:
    - value: ".*"
      operation: "pattern match"
      type: "string"
