apiVersion: v1
kind: ConfigMap
metadata:
  name: dex
data:
  config.yaml: |
    issuer: http://dex.auth.svc.cluster.local:5556/dex
    storage:
      type: kubernetes
      config:
        inCluster: true
    web:
      http: 0.0.0.0:5556
    logger:
      level: "debug"
      format: text
    oauth2:
      skipApprovalScreen: true
    enablePasswordDB: true
    staticPasswords:
    - email: user
      hash: $2y$12$TavNzhPlq8MtjPuaHpsH8.mycv5N03KarLEvteKeX6Pdf/UxEy03m
      username: user
      userID: user
    - email: user-nogroups
      hash: $2y$12$TavNzhPlq8MtjPuaHpsH8.mycv5N03KarLEvteKeX6Pdf/UxEy03m
      username: user-nogroups
      userID: user-nogroups
    staticClients:
    - id: authservice
      redirectURIs: [/authservice/oidc/callback]
      name: 'Authservice'
      secret: longrandomvalue
    # This field depends on a Dex fork. It is used to add groups to
    # the static user, in order to test the groups authorizer.
    # https://github.com/candlerb/dex/commit/6a67e7c453a101a7ec3d07fde7b1d8f97b878cc8
    memberships:
    - connector: local
      subject: user
      groups: [a, b]
