---
kind: ConfigMap
apiVersion: v1
metadata:
  name: dex
data:
  config.yaml: |
    issuer: http://dex-dex.apps.odh-cl1.apps.os-climate.org

    storage:
      type: memory

    web:
      http: "0.0.0.0:5556"

    grpc:
      addr: "0.0.0.0:5557"

    telemetry:
      http: "0.0.0.0:5558"

    oauth2:
      skipApprovalScreen: true

    staticClients:
      - id: superset
        name: Superset
        redirectURIs:
          - http://superset-odh-superset.apps.odh-cl1.apps.os-climate.org/oauth-authorized/dex
          - https://superset-secure-odh-superset.apps.odh-cl1.apps.os-climate.org/oauth-authorized/dex
          - http://superset-secure-odh-superset.apps.odh-cl1.apps.os-climate.org/oauth-authorized/dex
        secretEnv: SUPERSET_SECRET

      - id: trino
        name: Trino
        redirectURIs:
          - https://trino-secure-odh-trino.apps.odh-cl1.apps.os-climate.org/oauth2/callback
          - https://trino-route-odh-trino.apps.odh-cl1.apps.os-climate.org
        secretEnv: TRINO_SECRET

    connectors:
      - type: openshift
        id: openshift
        name: OpenShift
        config:
          issuer: https://kubernetes.default.svc
          clientID: system:serviceaccount:dex:dex
          clientSecret: $OPENSHIFT_CLIENT_SECRET
          redirectURI: http://dex-dex.apps.odh-cl1.apps.os-climate.org/callback
          groups:
            - system:authenticated
