apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: dexclients.deckhouse.io
  labels:
    heritage: deckhouse
    module: user-authn
spec:
  group: deckhouse.io
  scope: Namespaced
  names:
    plural: dexclients
    singular: dexclient
    kind: DexClient
  preserveUnknownFields: false
  versions:
    - name: v1alpha1
      served: true
      storage: true
      schema: &schema
        openAPIV3Schema:
          type: object
          description: |
            Allows applications that support DC authentication to interact with dex.
          required:
            - spec
          properties:
            spec:
              type: object
              properties:
                allowedGroups:
                  type: array
                  description: |
                    A list of groups whose members are allowed to connect to the client;
                    **By default**, all groups can connect.
                  items:
                    type: string
                redirectURIs:
                  type: array
                  description: 'Array or urls that dex can redirect to after successful authentication.'
                  items:
                    type: string
                trustedPeers:
                  type: array
                  description: |
                    OAuth2 client IDs that allowed cross authentication with the current client.

                    [Details...](https://developers.google.com/identity/protocols/CrossClientAuth)'
                  items:
                    type: string
    - name: v1
      served: true
      storage: false
      schema: *schema
