.. SPDX-FileCopyrightText: 2024 Univention GmbH
..
.. SPDX-License-Identifier: AGPL-3.0-only

.. _data-objects-udm:
.. _data-objects-udm-data-field-types:

UDM objects
===========

*UDM objects* are an internal representation of directory object data
generated by the corresponding *UDM module*.
For transfer from one service to another, it's often encoded in JSON format.
Various components within Nubus use UDM objects.
For information about fields, types, and consumers, see the following sections.

For information about UDM object fields and types,
see :external+uv-nubus-customization:ref:`customization-api-udm-rest-udm-object-field-types`
in :cite:t:`uv-nubus-customization`.

.. _data-objects-udm-consumer:

Consumers of UDM objects
------------------------

:numref:`data-objects-udm-relations-figure`
shows the functional components that consume *UDM objects*.

#. :ref:`overview-components-management-ui`
#. :ref:`overview-components-authorization-service`
#. :ref:`overview-components-portal-service`
#. :ref:`overview-components-directory-manager`
#. :ref:`overview-components-provision-service`
#. :ref:`overview-components-connectors-iam-connector`

The functional components use *UDM objects* for the following purposes:

* Support authorization decisions for an actor through the *Authorization Service*.
* Read user data information in the *Portal Service*.
* Write directory objects from UDM objects through the *UDM HTTP REST API*.
* Deliver object data to consumers through the *Provisioning Service*.
* Read and change user objects through the *UDM Library* in the *End User Self Service*.
* Create, read, update, and delete user and group objects through the *UDM Library* in the *Management UI*.
* Create, read, update, and delete user and group objects through the *UDM HTTP REST API* in the *Nubus Directory Importer*.

.. _data-objects-udm-relations-figure:

.. figure:: /images/UDM_data_object_relations.*
   :target: ../_images/UDM_data_object_relations.svg
   :alt: Functional components using UDM objects

   Functional components using UDM objects

.. _data-objects-udm-functions:

Functions for the UDM object
----------------------------

:numref:`data-objects-udm-functions-figure`
goes one level deeper
and shows the actual behavior
within the functional components that use the *UDM objects*.
The *UDM Library* is the central component.
It transforms UDM objects to and from directory objects
and it applies business logic before writing to the *Directory Service*.
The following application functions use the UDM objects from the *UDM Library*:

* *CRUD operations for UDM objects* in the *UDM HTTP REST API* in the *Directory Manager*.

* *Transform directory objects to UDM objects*
  in the *UDM Transformer* of the *Provisioning Service*.

* Create, read, update, and delete user and group objects in the *Management UI*.

The *UDM HTTP REST API* offers *UDM objects* through it's *CRUD operations for UDM objects* to the
following application functions:

* *Retrieve attributes of actor and target* in the *Guardian Authorization HTTP REST API*
  of the *Authorization Service*

* The *Portal Consumer* of the *Portal Service*.

* *Populate initial data for each consumer* in the *Prefill Service*
  of the *Provisioning Service*.

* *Import objects to Directory Manager* in the *Nubus Directory Importer*.

.. _data-objects-udm-functions-figure:

.. figure:: /images/UDM_data_object_details.*
   :target: ../_images/UDM_data_object_details.svg
   :alt: Overview of functions for the UDM object

   Overview of functions for the UDM object

.. seealso::

   :ref:`component-management-ui` in the functional components section
      for information about internal components and behavior of the *Management UI*.

   :ref:`component-authorization-service` in the functional components section
      for information about internal components and behavior of the *Authorization Service*.

   :ref:`component-portal-service` in the functional components section
      for information about internal components and behavior of the *Portal Service*.

   :ref:`component-directory-manager` in the functional components section
      for information about internal components and behavior of the *Directory Manager*.

   :ref:`component-provisioning-service` in the functional components section
      for information about internal components and behavior of the *Provisioning Service*.

   :ref:`component-iam-connector` in the functional components section
      for information about internal components and behavior of the *IAM Connector*.
