checktext: |-
  Login to OpenShift using the oc cli tool

  > oc login -u <USER> <OPENSHIFT_URL>
  enter password when prompted

  If the DoD Notice and Consent Banner is not displayed, this is a finding.

  Or

  Verify that motd config map exists and contains the DoD Notice and Consent Banner

  > oc describe configmap/motd -n openshift

  If the configmap does not exist, or it does not contain the DoD Notice
  and Consent Banner text in the message data attribute, this is a finding.

fixtext: |-
  The following command will create a configmap that displays the DOD notice
  and consent banner when logging in using the OpenShift CLI tool (oc)

  > echo 'apiVersion: v1
  kind: ConfigMap
  metadata:
    name: motd
    namespace: openshift
  data:
    message: "You are accessing a U.S. Government (USG) Information System
    (IS) that is provided for USG-authorized use only. By using this IS
    (which includes any device attached to this IS), you consent to the
    following conditions:\n\n-The USG routinely intercepts and monitors
    communications on this IS for purposes including, but not limited to,
    penetration testing, COMSEC monitoring, network operations and defense,
    personnel misconduct (PM), law enforcement (LE), and counterintelligence
    (CI) investigations.\n\n-At any time, the USG may inspect and seize data
    stored on this IS.\n\n-Communications using, or data stored on, this
    IS are not private, are subject to routine monitoring, interception,
    and search, and may be disclosed or used for any USG-authorized
    purpose.\n\n-This IS includes security measures (e.g., authentication
    and access controls) to protect USG interests--not for your personal
    benefit or privacy.\n\n-Notwithstanding the above, using this IS
    does not constitute consent to PM, LE or CI investigative searching
    or monitoring of the content of privileged communications, or work
    product, related to personal representation or services by attorneys,
    psychotherapists, or clergy, and their assistants. Such communications
    and work product are private and confidential. See User Agreement for
    details."' | oc apply -f -


srg_requirement: |-
  Red Hat OpenShift Container Platform 4 must display the Standard Mandatory
  DoD Notice and Consent Banner before granting access to platform components.
