---
apiVersion: v1
kind: ConfigMap
metadata:
  name: orgs-data
data:
  orgs-data.yaml: |
    # Portfolio of client applications across organizations
    clients:
      - name: "ohifviewer"
        description: "Medical image viewer application"
        roles:
        - name: view-dicom-studies
          scope: private
      - name: "orthanc"
        description: "Medical image management system"
        roles:
        - name: update-dicom-studies
          scope: private
        - name: delete-dicom-studies
          scope: private
      - name: "logging"
        description: "Organizational logging console client"
        roles:
        - name: admin
          scope: organization
      - name: "monitoring"
        description: "Organizational logging console client"
        roles:
        - name: admin
          scope: organization
      - name: "test-apps-istio"
        description: "Test app client with Istio"
        roles:
        - name: view-dicom-studies
          scope: private
      - name: "test-apps-no-istio"
        description: "Test app client no Istio"
        roles:
        - name: view-dicom-studies
          scope: private
    organizations:
      - name: "Dario Contreras"
        id: "dario-contreras"
        description: "The major public hospital in the capital city"
        # In keycloak they are called roles but they feel like scopes
        org-roles:
          - admin
        groups:
          - name: doctors
            clients:
            - ohifviewer
            - test-apps-istio
            - test-apps-no-istio
          - name: nurses
            clients:
            - test-apps-istio
            - test-apps-no-istio
          - name: technologists
            clients:
            - ohifviewer
            - orthanc
          - name: administrators
            clients:
            - logging
            - test-apps-istio
            - test-apps-no-istio
            - monitoring
        users:
          - name: Papi
            lastname: Jones
            groups: 
            - doctors
          - name: Isabella
            lastname: Espinal
            groups: 
            - doctors
          - name: Bob
            lastname: Philips
            groups: 
            - nurses
          - name: Carmen
            lastname: Espinal
            groups: 
            - nurses
            - technologists
          - name: Freida
            lastname: Nielsen
            groups:
            - technologists
      - name: "Cedimat"
        id: "cedimat"
        description: "The major private healthcare institution in the capital city"
        # In keycloak they are called roles but they feel like scopes
        org-roles:
          - admin
        groups:
          - name: doctors
            clients:
            - ohifviewer
            - test-apps-istio
            - test-apps-no-istio
          - name: nurses
            clients:
            - test-apps-istio
            - test-apps-no-istio
          - name: clinicians
            clients:
            - ohifviewer
            - orthanc
          - name: administrators
            clients:
            - logging
            - monitoring
            - test-apps-istio
            - test-apps-no-istio
        users:
          - name: Mami
            lastname: Jones
            groups: 
              - doctors
          - name: Chace
            lastname: Cole
            groups: 
              - doctors
          - name: Fausto
            lastname: Espinal
            groups: 
              - nurses
              - administrators
          - name: Nancy
            lastname: Williams
            groups: 
              - nurses
              - clinicians
          - name: Leif
            lastname: Eriksen
            groups: 
              - administrators
              - clinicians
