Customize Approval Page#

To use a customized approval page, set the INRUPT_OPENID_APPROVAL_TEMPLATE_LOCATION property of the ESS’ Solid OpenID Connect service. That is:

  • Create an overlay structure as described in Customize ESS, and

  • In your overlay directory, add your custom HTML approval page and the overlay yaml file(s).

Procedure#

In your source repository for your custom overlays,

  1. Create a new directory for your overlay as described in Customize ESS. For example:

    mkdir overlay-approval-page
    cd overlay-approval-page
    
  2. Place your new approval page file, for example approval.html in the overlay directory.

  3. In the directory, create a new custom-approval-env.yaml with the following content:

    #custom-approval-env.yaml
    
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: openid-mongodb
    spec:
      template:
        spec:
          containers:
            - name: openid-mongodb
              env:
                - name: INRUPT_OPENID_APPROVAL_TEMPLATE_LOCATION
                  value: approval.html
    
  4. In the directory, create a new kustomization.yaml with the following content:

    #kustomization.yaml
    
    apiVersion: kustomize.config.k8s.io/v1beta1
    kind: Kustomization
    
    bases:
      - <relative path to your ESS directory>/<env>/release/ess/deployment/kubernetes/bases/openid-mongodb
    
    patchesStrategicMerge:
      - custom-approval-env.yaml
    
  5. To verify the overlay, you can build the overlay and output to a file, such as kustomized.yaml, for review:

    kustomize build > kustomized.yaml
    
  6. To preview the changes that will be applied to your cluster, you can use kubectl diff:

    kubectl diff -f kustomized.yaml
    
  7. When you are ready, you can apply the changes to your cluster:

    kubectl apply -f kustomized.yaml
    

For more information on Kustomize, see Declarative Management of Kubernetes Objects Using Kustomize.

For additional configuration properties for the ESS’ OpenID Connect service, see Solid OpenID Connect Service.