opendesk-edu

Architecture

openDesk is designed as a Kubernetes deployment.

It consists of a set of Helm charts orchestrated by Helmfile.

openDesk includes functional applications, like file management, chat, and email. Other services such as databases and object storage are included for evaluation purposes only. In production, you must provide these services yourself.

Overview

The following diagram shows a high-level overview of openDesk.

flowchart TD
    A(User) -->|Log In| B[[Keycloak]]
    subgraph Nubus
        B -->C[Portal]
        B -->|User Directory| OpenLDAP[[OpenLDAP]]
    end
    C -->|Manage Files| NC[Nextcloud]
    C -->|Chat & Call| EL[Element]
    C -->|Send/Receive E-Mails| OXE[OX App Suite]
    C -->|Manage Appointments| OXC[OX App Suite]
    NC -->|Edit Office Documents| CO[Collabora Online]
    NC -->|Edit diagram.net Documents| CP[CryptPad]
    C -->|Manage Tasks| OP[OpenProject]
    C -->|Store Knowledge| XW[XWiki]
    C -->|Meet People| JI[Jitsi]
    C -->|Manage Notes| NO[fa:fa-note Notes]

openDesk includes a portal that allows navigation to the respective application. The portal is part of the Identity and Access Management (IAM) application shipped with openDesk: Nubus. Nubus includes OpenLDAP for storing users, groups, and permissions, and Keycloak for single sign-on with LDAP user federation configured to use the aforementioned OpenLDAP.

When the user is authenticated by Keycloak, the portal shows the applications the user is permitted to access.

The user can now access applications and use the corresponding functionality without the need to authenticate again. This is implemented using the OpenID Connect (OIDC) protocol.

Nubus (IAM)

Nubus is a specialized IAM platform developed by Univention GmbH to centralize and simplify identity management in IT environments. It is typically used in contexts where user authentication, role-based access control, and integration with multiple systems are essential.

In openDesk, Nubus serves the following purposes:

  1. Identity Provider (IdP)

    Nubus acts as the central IdP in a federated authentication system, issuing and managing authentication tokens for applications.

  2. Access Control Layer

    As a gateway, Nubus ensures that only authorized users can access specific systems, services, or APIs, enforcing RBAC policies.

  3. Integration Hub

    Links applications by synchronizing identity and access data across them, ensuring consistency.

  4. User Provisioning

    Automates the process of creating, updating, and deactivating user accounts across integrated systems based on organizational workflows.

  5. IAM Administration

    The user, group and permission information which is stored in Nubus’ OpenLDAP service is managed by IAM Admin(s) using a stripped down version of the UMC (Univention Management Console).

  6. Frontend Integration Authentication

    A specialized component - the Intercom Service - acts according to the Backend-for-Frontend pattern when it comes to certain integration use cases, for example, ones that require the frontend of one application to call the API of another service, that also has the need for user authentication. See Component integration for more details.

  7. Portal

    Nubus provides a Portal component for users to access the connected applications. This component also includes self-service possibilities e.g. for password resetting.

For additional information, refer to the Nubus for Kubernetes Architecture Manual.

Authentication

openDesk uses the OpenID Connect (OIDC) protocol for authentication and authorization.

Identity data flows

An overview of

Some components trust others to handle authentication for them.

flowchart TD
 K[IdP]-->L[LDAP]
 N[Nextcloud]-->L
 O[OpenProject] --> L
 A[OX AppSuite]-->L
 D[OX Dovecot]-->L
 P[Portal/Admin]-->L
 X[XWiki]-->L
 A-->K
 N-->K
 D-->K
 O-->K
 X-->K
 P-->K
 E[Element]-->K
 J[Jitsi]-->K
 I[IntercomService]-->K
 C[Collabora]-->N
 R[CryptPad]-->N
 F[Postfix]-->D

OpenID Connect (OIDC)

OIDC is an identity layer on top of the OAuth 2.0 protocol, allowing clients (Relying Party (RP)) to verify the identity of end-users based on the authentication performed by an authorization server (OpenID Provider (OP)). In openDesk, Keycloak serves as the OIDC provider, managing user authentication and issuing tokens for secure access to applications.

The following sequence diagram shows an OIDC flow of a user logging into openDesk’s project management application. In openDesk, applications such as OpenProject take the role of the OIDC Relying Party, whereas Keycloak acts as the OIDC provider and OpenLDAP as the IdP.

sequenceDiagram
    autonumber
    participant Browser as Browser
    participant OpenProject as OpenProject<br/>OIDC Relying Party
    participant Keycloak as Keycloak<br>OIDC Provider
    participant LDAP as OpenLDAP<br>IdP
    Browser->>OpenProject: GET https://projects.domain.tld
    OpenProject-->>Browser: Redirect to OIDC provider authentication form (with request)
    Browser->>Keycloak: Authenticate with username/password, optionally 2FA
    Keycloak->>LDAP: Retrieve/update user information
    LDAP->>Keycloak: Return user info
    Keycloak-->>Browser: 302 Redirect https://projects.domain.tld/callback?[...]
    Browser->>OpenProject: GET https://projects.domain.tld/callback?[...]
    OpenProject->>Keycloak: POST https://id.domain.tld/oauth/token
    Keycloak-->>OpenProject: Return JSON with token, signature
    OpenProject->>OpenProject: Verify token signature valid, signed by Provider
    OpenProject-->>Browser: 302 Redirect https://projects.domain.tld
    Note over Browser: User is authenticated

Keycloak

Keycloak is an open-source identity and access management solution for web based applications and services. It provides features such as single sign-on, multi-factor authentication, user federation, and centralized user management.

In openDesk, Keycloak serves as the OIDC provider, handling user authentication and issuing tokens for secure access to applications.

For more information, see the Keycloak Documentation.

Keycloak Extensions

Part of Nubus are the Keycloak Extensions which are used for:

To address these use cases, the Keycloak Extensions act as a proxy to Keycloak.

OpenLDAP

OpenLDAP is an open-source implementation of the Lightweight Directory Access Protocol (LDAP) that provides a central repository for user and group information. In openDesk, OpenLDAP is used as the user directory to store user and group data, and also manages access control policies across the applications.

Authorization

LDAP group synchronization

LDAP group synchronization ensures that user group memberships are consistent across the applications in openDesk that make use of the IAM group information. Nubus uses OpenLDAP to store and manage user groups, which are synchronized with integrated applications to enforce access control policies.

Keycloak LDAP groups are available to the following applications, however, none of the applications support nested groups. This means that users must be direct members of a group, as members of subgroups will be ignored.

Provisioning

Part of the already mentioned Nubus IAM is a provisioning service.

Besides the Nubus internal user of the provisioning service, the OX AppSuite is currently the only openDesk application that is getting data actively provisioned to it. This is in contrast to the norm, where applications fetch the required information from the LDAP themselves.

OX Connector

As the OX AppSuite is using an application specific format to get e.g. users provisioned, there is also a specific connector component that links the provisioning service to the OX AppSuite, it is called the OX Connector.

The OX SOAP API is used by the OX Connector to synchronize information about the following OX AppSuite objects:

To find out more, see Roles & Permissions.

SCIM

System for Cross-domain Identity Management (SCIM) is an open standard for automating the exchange of user identity information between identity domains or IT systems. SCIM is designed to make user provisioning and management easier by providing a standardized way to manage user identities in cloud-based applications and services.

In openDesk, SCIM will be used in the future to automate the process of creating, updating, and deactivating user accounts across the applications. This ensures that user data is consistent across all applications, reducing the administrative overhead and potential for errors.

[!note] SCIM support is planned in openDesk for 2025.

Component integration

Important, especially from the end user perspective, are the functional integrations between the different openDesk applications.

flowchart TD
 OX-AppSuite_Frontend-->|Silent Login, Filepicker, Central Navigation|Intercom_Service
 Element-->|Silent Login, Central Navigation|Intercom_Service
 Intercom_Service-->|Silent Login, Token Exchange|IdP
 Intercom_Service-->|Filepicker|Nextcloud
 Intercom_Service-->|Central Navigations|Portal
 Intercom_Service-->|Newsfeed|XWiki
 OX-AppSuite_Backend-->|Filepicker|Nextcloud
 OX-AppSuite_Backend-->|Videoconferences|Element
 Nextcloud-->|Central Navigation|Portal
 OpenProject-->|Central Navigation|Portal
 OpenProject-->|File Store|Nextcloud
 XWiki-->|Central Navigation|Portal
 Nextcloud-->|Central Contacts|OX-AppSuite_Backend
 OX-AppSuite_Frontend-->|Filepicker|OX-AppSuite_Backend
 Portal-->|Newsfeed|Intercom_Service

Details can be found in the upstream documentation that is linked in the respective sections.

Intercom Service / Silent login

The Intercom Service is deployed in the context of Nubus. Its role is to enable cross-application integration based on the user’s browser interaction, as handling authentication when the frontend of an application has to call the API from another application is often challenging.

To establish a session with the Intercom Service, applications can use the silent login feature within an iframe.

Currently, only OX AppSuite and Element are using the frontend-based integration.

Links:

Central contacts

OX App Suite is responsible for managing contacts in openDesk. Therefore, Nextcloud’s PHP backend is using the OX AppSuite’s middleware Contacts API to

Links:

Central navigation

Central navigation is based on an API endpoint in the Nubus portal that returns a JSON containing the portal’s contents for a given user. The response from the API endpoint is used in the openDesk applications to render the central navigation.

The API can be called by

The central navigation expects the API caller to present a shared secret for authentication and the username for whom the portal contents should be returned for.

A curl based request returning the navigation contents looks like this:

curl 'https://portal.<DOMAIN>/univention/portal/navigation.json?base=https%3A//portal.<DOMAIN>&language=de-DE' -u "<USERNAME>:<SHARED_SECRET>"

Filepicker

The Nextcloud Filepicker is integrated into the OX AppSuite, supporting the following use cases within the respective openDesk instance’s Nextcloud:

The Filepicker uses frontend and backend-based integration:

Links:

Newsfeed

The portal renders a newsfeed based on entries of a predefined openDesk blog in XWiki. It accesses the required XWiki service through the Intercom Service’s /wiki endpoint, in combination with the previously described silent login.

Links:

(OpenProject) File store

While OpenProject allows you to attach files to work packages directly, it is often preferred that the files are stored within Nextcloud or to link an existing file from your openDesk Nextcloud to a work package.

Therefore, openDesk pre-configures the trust between the openDesk instance’s OpenProject and Nextcloud during the openproject-boostrap deployment step. As a prerequisite for that, openDesk’s Nextcloud contains the integration_openproject app.

The file store must still be enabled per project in OpenProject’s project admin section.

Links:

Mail setup

The mail setup depicted in the diagram below shows the design to support multiple application workloads inside openDesk while interoperating with external mail infrastructures and optional mail clients like Thunderbird.

The system is intentionally modular: different applications (Nextcloud, OpenProject, XWiki, Synapse, Notes, etc.) may need to send emails even when no full groupware stack is deployed. In that case the following components are also not being deployed:

Even without these components, the platform remains operational for outbound email because the (Base) Postfix instance provides a simple SMTP submission service using static SASL credentials. This allows all applications in openDesk to continue sending system notifications and user emails.

Overview

flowchart-elk

extClient[optional Mail Clients]
extRelay[Mailrelay/MXe]
extMTA[MTAs]

subgraph extSvc[K8s External Servies]
    extSvcDC((dovecot-external))
    extSvcPF((postfix-ox-external))
end

subgraph openDesk
    subgraph Apps
        AppsOther[Nubus<br>Nextcloud<br>OpenProject<br>Synapse<br>XWiki<br>Notes]
        AppsOXAS[OX App Suite]
    end
    subgraph Postfix
        PostfixBase[#40;Base#41; Postfix]
        PostfixOX[Postfix-OX]
    end
    Dovecot[Dovecot<br>authenticates using<br>SASL using LDAP & OAuth]
    Dovecot -->|Sieve mails<br>without no auth| PostfixBase
    PostfixOX -->|auth|Dovecot
end

Postfix -->|lmtps| Dovecot
Postfix -->|smtp| extRelay

extSvcDC --> Dovecot
extSvcPF --> PostfixOX

AppsOther -->|auth:<br>static creds.| PostfixBase
AppsOXAS --> Dovecot
AppsOXAS -->|auth:<br>OAuth| PostfixOX

extClient --> extSvcDC
extMTA -->|WARNING: SPF and DKIM validation required| extSvcPF
extClient -->|auth:<br>LDAP| extSvcPF

classDef postfix fill:#85extMTA9C;
class PostfixBase postfix;
classDef postfix-ox fill:#F3E5Dovecot;
class PostfixOX,extSvcPF postfix-ox;
classDef dovecot fill:#BECBD6;
class Dovecot,extSvcDC dovecot;

The Postfixes

Applications vs. services

openDesk consists of a variety of open-source projects, please find an overview below:

Name Description Type
Certificates TLS certificates Service
ClamAV (Distributed) Antivirus engine Service
ClamAV (Simple) Antivirus engine Service
Collabora Weboffice Application
CryptPad diagrams.net editor Application
dkimpy-milter DKIM milter for Postfix Service
Element Secure communications platform Application
Jitsi Videoconferencing Application
MariaDB Database Service
Memcached Cache database Service
MinIO Object storage Service
Nextcloud File share Application
Nubus (UMS) Identity management & portal Application
OpenProject Project management Application
OX Appsuite & Dovecot Groupware with IMAP mail backend Application
Postfix MTA Service
PostgreSQL Database Service
Redis Cache database Service
XWiki Knowledge management Application

The end user focussed components are called applications and provide the functional scope of openDesk, please find separate paragraphs on each of the applications below.

Other components are of type “Service”, these are used for development and evaluation purposes only, they need to be replaced in production deployments.

For the APIs / Protocols supported by the applications, please read the apis.md.

Collabora (weboffice)

Collabora is a powerful online document editing suite.

In openDesk, Collabora is used for editing Office documents such as rich texts, spreadsheets and presentations.

CryptPad Online (diagrams)

CryptPad is a collaborative editor framework supporting end-to-end encryption.

In openDesk, CryptPad is for editing diagrams.net documents.

Element/Synapse (chat & call)

Element Web is the web frontend for Synapse, the reference implementation of the sovereign and secure Matrix protocol.

In openDesk, Element is used for chat and direct audio & video calling.

Jitsi (video conferencing)

Jitsi is an open-source video conferencing solution that allows users to hold secure video meetings.

In openDesk, Jitsi is used for video conferencing and online meetings. It integrates with other applications to provide seamless communication capabilities.

Jigasi (Jitsi’s SIP component) also allows joining the meeting via phone call if an external SIP server and SIP trunk are provided.

Nextcloud (files)

Nextcloud is a file storage and sync platform with powerful collaboration capabilities with desktop, mobile and web interfaces.

Nubus (identity and access management / portal)

Nubus is a unified Identity & Access Management, providing you with full control and digital sovereignty over your IAM processes and data.

In openDesk, Nubus provides the management required for users, groups and other IAM objects, as well as the portal, the Identity provider for Single Sign-On and federation scenarios.

OpenProject (project management)

OpenProject is a project management tool that supports agile project management, team collaboration, issue tracking, and more.

OX App Suite (groupware) with OX Dovecot (mail backend)

OX App Suite is a groupware application using OX Dovecot as its backend mail store.

In openDesk, OX App Suite is used for email, calendar, address book and personal task management.

XWiki (knowledge management)

XWiki is an open-source wiki platform for knowledge management and collaboration.

Application specific user accounts

While the IAM manages users centrally, some applications come with local accounts for administrative purposes:

Application Account name Purpose Password
Collabora collabora-internal-admin To access the Collabora admin dashboard secrets.collabora.adminPassword
Element uvs The account for the “User Verification Service”. It is used by Jitsi integrated into Element. secrets.matrixUserVerificationService.password
  meeting-bot Used by the Nordeck Meeting-Bot to manage meeting rooms in Synapse. secrets.matrixNeoDateFixBot.password
Nextcloud nextcloud Bootstrap the Nextcloud fileshare for OpenProject with opendesk-openproject-bootstrap job1. secrets.nextcloud.adminPassword
OX App Suite admin OX Connector to provision context, users, groups etc. secrets.oxAppsuite.adminPassword
OpenProject set in secrets.openproject.apiAdminUsername Bootstrap the Nextcloud fileshare for OpenProject with opendesk-openproject-bootstrap job1. secrets.openproject.apiAdminPassword
XWiki superadmin Only available with debug.enabled: true, can be used for interactive login using /bin/view/Main/?oidc.skipped=true. secrets.xwiki.superadminpassword

Footnotes

  1. We are working on a new approach to provision the OpenProject filestore, therefore the accounts are planned to be deactivated/removed in the future.  2