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

.. _component-dependencies:

Dependencies
============

This section describes the internal dependencies of Nubus for Kubernetes,
and the external dependencies regarding third-party applications,
from the perspective of Nubus.
Linked sections provide detailed information about component features and interfaces.
This section distinguishes between internal and external components,
including detailed information about the dependencies.

.. tip::

   The figures in this section mostly use the ArchiMate Serving relationship,
   which represents a component that provides its functionality to another component.
   The models show the dependencies between the components.

.. _component-dependencies-functional-level:

Functional component level
--------------------------

This section gives an overview about
the dependencies on the level of the Nubus functional components
with an internal view and an external view.

.. _component-dependencies-internal:

Internal view functional component
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This section gives an overview about
the dependencies on the Nubus functional components,
as shown in :numref:`component-dependencies-internal-figure`.
For a view including the application components inside the functional components,
see :ref:`component-dependencies-details-internal`.

.. _component-dependencies-internal-figure:

.. figure:: /images/Component_dependencies_internal.*
   :target: ../_images/Component_dependencies_internal.svg
   :alt: Internal view of the component dependencies on the functional component level

   Internal view of the component dependencies on the functional component level

Authorization service
   Depends on the functionality of:

   * :ref:`component-directory-manager`
   * :ref:`component-identity-provider`
   * :ref:`component-management-ui`

End User Self Service
   The :ref:`overview-components-end-user-self-service` depends on the functionality of:

   * :ref:`component-management-ui`
   * :ref:`component-portal-service`
   * :ref:`component-provisioning-service`

Management UI
   It depends on the functionality of:

   * :ref:`component-directory-manager`
   * :ref:`component-identity-store-directory-service`
   * :ref:`component-authorization-service`
   * :ref:`component-identity-provider`

   It provides its functionality to:

   * :ref:`component-end-user-self-service`
   * :ref:`component-portal-service`

Directory Manager
   It depends on the functionality of:

   *  :ref:`component-identity-store-directory-service`

   It provides its functionality to:

   * :ref:`component-management-ui`
   * :ref:`component-authorization-service`
   * :ref:`component-iam-connector`
   * :ref:`component-provisioning-service`
   * :ref:`component-portal-service`

IAM Connector
   The :ref:`overview-components-connectors-iam-connector`
   depends on the functionality of the following components:

   * :ref:`component-directory-manager`
   * :ref:`component-identity-store-directory-service`

Portal Service
   The :ref:`overview-components-portal-service` depends on the functionality
   of following components:

   * :ref:`component-identity-store-directory-service`
   * :ref:`component-management-ui`
   * :ref:`component-directory-manager`
   * :ref:`component-provisioning-service`

   It provides functionality to the :ref:`overview-components-end-user-self-service`.

Identity Store and Directory Service
   The :ref:`component-identity-store-directory-service` is the central component.
   It provides its functionality to following components:

   * :ref:`component-provisioning-service`
   * :ref:`component-portal-service`
   * :ref:`component-management-ui`
   * :ref:`component-directory-manager`
   * :ref:`component-iam-connector`
   * :ref:`component-identity-provider`

Identity Provider
   It depends on the functionality of:

   * :ref:`component-identity-store-directory-service`

   It provides its functionality to:

   * :ref:`component-authorization-service`
   * :ref:`component-management-ui`
   * :ref:`component-2fa-helpdesk`
   * :ref:`overview-components-intercom-service`

2FA Helpdesk
   The :ref:`component-2fa-helpdesk`
   depends on the functionality of :ref:`component-identity-provider`.

Provisioning Service
   The :ref:`component-provisioning-service` depends on the functionality of the following components:

   * :ref:`component-identity-store-directory-service`
   * :ref:`component-directory-manager`

   It provides its functionality to:

   * :ref:`component-portal-service`
   * :ref:`component-end-user-self-service`

Intercom Service
   The :ref:`overview-components-intercom-service`
   depends on the functionality of the :ref:`component-identity-provider`.

.. _component-dependencies-external:

External view functional component
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This section describes the dependencies between the involved internal Nubus components
and external components, such as *Third-party applications not part of Nubus*,
as shown in :numref:`component-dependencies-external-figure`.
The term *Third-party application* is a placeholder for any application external to Nubus.

.. _component-dependencies-external-figure:

.. figure:: /images/Component_dependencies_external.*
   :target: ../_images/Component_dependencies_external.svg
   :alt: External components dependencies

   External components dependencies

The following functional components of Nubus for Kubernetes provide their functionality to third-party applications:

* :ref:`component-identity-store-directory-service`
* :ref:`component-identity-provider`
* :ref:`component-authorization-service`
* :ref:`component-provisioning-service`
* :ref:`component-directory-manager`

The following functional components of Nubus for Kubernetes can use functionality of third-party applications:

* :ref:`component-iam-connector`
* :ref:`component-intercom-service`

.. _component-dependencies-behavior-level:

Application component level
---------------------------

This section gives an overview about
the dependencies on the application component level of the Nubus functional components.
It offers a separate internal and external view.
Application components are active components that are part of the functional components.

.. _component-dependencies-details-internal:

Internal view application component level
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This section describes the internal dependencies on the behavior level of the functional components.
It shows the behaviors of components that depends on behavior functionality of another component.
It covers the following components.

:ref:`component-authorization-service`
   It provides two HTTP :term:`REST` APIs and the *Guardian Management UI*

   The *Guardian Authorization HTTP REST API*,
   uses functionality from the *UDM HTTP REST API*
   in the :ref:`component-directory-manager`
   to consume identity data.
   Second, it uses the functionality of *Keycloak*
   in the :ref:`component-identity-provider`.

   The *Guardian Management HTTP REST API*
   also uses functionality from *Keycloak*.

   The *Guardian Management UI* uses functionality from the *UMC-Server* in the *Management UI*.

:ref:`component-directory-manager`
   It provides the *UDM Library* and the *UDM HTTP REST API*.

   The *UDM Library* uses functionality from the *LDAP Server*
   in the :ref:`component-identity-store-directory-service`.

   The *UDM HTTP REST API* uses the following components:

   * *LDAP Server*
   * *UDM Library*

   The following components use functionality from the *UDM HTTP REST API*:

   * *Guardian Authorization HTTP REST API* in :ref:`component-authorization-service`
   * *Nubus Directory Importer*
   * *Prefill Service* in :ref:`component-provisioning-service`
   * *Portal Consumer* in :ref:`overview-components-portal-service`

   The following components use functionality from the *UDM Library*:

   * *UDM Transformer* in :ref:`component-provisioning-service`
   * *UMC Server* in :ref:`component-management-ui`

:ref:`component-identity-store-directory-service`
   The *LDAP Server* is a key component in Nubus.
   It provides its functionality to various components,
   as you can see from the centered position in :numref:`component-dependencies-details-internal-figure`.

:ref:`component-identity-provider`
   The component *Keycloak* has the following dependencies:
   It uses the functionality of the *LDAP Server* in the :ref:`component-identity-store-directory-service`.

   The following components use functionality of *Keycloak*:

   #. :ref:`overview-components-connectors-nubus-directory-importer`

   #. :ref:`interfaces-authorization-service-management-rest`
      and :ref:`interfaces-authorization-service-authorization-rest`
      in :ref:`component-authorization-service`

   #. :ref:`component-2fa-helpdesk-backend` in :ref:`component-2fa-helpdesk`

:ref:`component-provisioning-service`
   It uses functionality from the following components:

   #. *Prefill Service* uses functionality from the *UDM HTTP REST API* in the :ref:`component-directory-manager`.
   #. *UDM Transformer* uses functionality from the *UDM Library*.
   #. *UDM Listener* uses functionality from the *LDAP Server* in the :ref:`component-identity-store-directory-service`.

   The following components use functionality from the *Events and Consumer API*:

   * *Portal Consumer* in :ref:`component-portal-service`
   * *Self Service Consumer* in :ref:`component-end-user-self-service`

:ref:`overview-components-portal-service`
   It uses functionality from the following components:

   * For the *Portal Consumer*:

     * *LDAP Server* in :ref:`component-identity-store-directory-service`
     * *UDM HTTP REST API* in :ref:`component-directory-manager`
     * *Events and Consumer API* in the *Provisioning Service*
     * *UMC Server* in :ref:`component-management-ui`

   * *Portal Server* uses functionality from the *UMC Server*.

:ref:`overview-components-management-ui`
   The *UMC Server* uses functionality from the following components:

   * *UDM Library* in :ref:`component-directory-manager`
   * *LDAP Server* in :ref:`component-identity-store-directory-service`
   * *Keycloak* in :ref:`component-identity-provider`

   The *UMC Server* provides its functionality to the following components:

   * *Portal Server* in :ref:`component-portal-service`
   * *Self Service Consumer* and the :ref:`component-end-user-self-service`

:ref:`overview-components-end-user-self-service`
   It depends on the following components:

   * *UMC Server* in :ref:`overview-components-management-ui`
   * *LDAP Server* in :ref:`component-identity-store-directory-service`
   * *Events and Consumer API* in the :ref:`component-provisioning-service`
   * *Portal Frontend* in the :ref:`component-portal-service`

:ref:`overview-components-2fa-helpdesk`
   It depends on *Keycloak* in the :ref:`overview-components-identity-provider`.

:ref:`overview-components-intercom-service`
   It depends on *Keycloak* in the :ref:`overview-components-identity-provider`.

.. _component-dependencies-details-internal-figure:

.. figure:: /images/Component_dependencies_details_internal.*
   :target: ../_images/Component_dependencies_details_internal.svg
   :alt: Internal components dependencies details

   Internal components dependencies details

.. _component-dependencies-details-external:

External view application component level
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The section describes the dependencies on the behavior level
between internal components and third-party applications,
as shown in :numref:`component-dependencies-details-external-figure`.
It covers the following components:

:ref:`component-authorization-service`
   The *Third-party application, not part of Nubus*
   **can** use the *Guardian Authorization HTTP REST API*.

:ref:`component-directory-manager`
   The *Third-party application, not part of Nubus*
   **can** use the *UDM HTTP REST API*.

:ref:`component-identity-store-directory-service`
   The *Third-party application, not part of Nubus*
   **can** use the *LDAP Server*.

:ref:`component-provisioning-service`
   The *Third-party application, not part of Nubus*
   **can** use the functionality of the *Consumer Messages HTTP REST API*.

:ref:`component-identity-provider`
   The *Third-party application, not part of Nubus*
   **can** use the functionality of *Keycloak*.

:ref:`component-intercom-service`
   The *Third-party application, not part of Nubus*
   **can** use the *Intercom Service*.

:ref:`component-nubus-directory-importer`
   The *Third-party application, not part of Nubus*
   **can** provide functionality to the *Nubus Directory Importer*,
   if the functionality is of use for it.

.. _component-dependencies-details-external-figure:

.. figure:: /images/Component_dependencies_details_external.*
   :target: ../_images/Component_dependencies_details_external.svg
   :alt: External components dependencies

   External components dependencies details
