Displaying a terms and conditions prompt

If you need users to accept terms and conditions before they use the web client, you can enable a dialog that prompts users to accept the terms and conditions before they can log in to the web client. For example, you might need to enable the prompt to comply with the Federal Information Security Management Act (FISMA) regulations.

Who needs to complete this task?
To complete this task, you must have one of the following roles:
  • Cluster administrator
  • Instance administrator
When do you need to complete this task?
Complete this task if you want to configure the Cloud Pak for Data web client to display a terms and conditions prompt.

Before you begin

Best practice: You can run many of the commands in this task exactly as written if you set up environment variables for your installation. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

About this task

When you configure the web client to display a terms and conditions prompt, you must specify the following information:
  • The header text for the dialog
  • The terms and conditions that the user must accept
  • The prompt that the user must click to acknowledge that they accept the terms and conditions

Procedure

  1. Log in to Red Hat® OpenShift® Container Platform as a user with sufficient permissions to complete the task.
    ${OC_LOGIN}
  2. Create a file named terms-conditions-configmap.yaml with the following format:
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: terms-conditions-configmap
    data:
      login-dialog.json: |
        {
            "enabled": true,
            "headerText": "Terms of use",
            "dialogText": "The terms and conditions of use that your user must accept.",
            "acceptText": "I understand and accept the terms"
        }

    Edit the value of the following parameters.

    Property Description
    headerText Specify the text to display as the header in the dialog.
    For example:
    "headerText": "Terms of use",

    Use standard JSON string format.

    dialogText Specify the terms and conditions that the user must agree to before they can access the web client.
    For example:
    "dialogText": "The terms and conditions of use that your user must accept.",

    Use standard JSON string format.

    acceptText Specify the text that the user must click to acknowledge that they agree to the terms and conditions.
    For example:
    "acceptText": "I understand and accept the terms",

    Use standard JSON string format.

  3. Add the ConfigMap to the instance of Cloud Pak for Data where you want to display the terms and conditions prompt:
    oc create -f terms-conditions-configmap.yaml \
    --namespace=${PROJECT_CPD_INST_OPERANDS}
  4. Confirm that the ConfigMap was created:
    oc get configmaps terms-conditions-configmap \
    --namespace=${PROJECT_CPD_INST_OPERANDS}
  5. Run the following command to restart the usermgmt pods:
    oc delete pods -l component=usermgmt \
    --namespace=${PROJECT_CPD_INST_OPERANDS}

    Wait for the usermgmt pods to be Running.