The Nubus Provisioning service was originally designed for running in Kubernetes. It was then migrated to UCS. UCS' system role concept (Primary, Backup, Replica, Memberserver) requires the Provisioning system to work slightly different in UCS and Kubernetes, with the main differences being in the "NATS cluster management" (see section Architecture) and the Backup to Primary failover mechanism (see section of the same name).
The provisioning service on UCS systems consists of two apps:
provisioning-service-backend: This app installs a listener module that captures LDAP changes and writes them to the LDAP-queue. This app is only installed on the Primary Directory Node.provisioning-service: This app contains the main provisioning service components: udm-transformer, prefill, dispatcher, and provisioning API and is installed on the Primary and on all Backups.
See architecture.md for an in-depth explanation of the architecture of the provisioning service on UCS.
The provisioning service supports backup to primary failover.
The backup-to-primary scenario is automatically handled via
appcenter/provisioning-service/scripts/50provisioning-service-backup2master,
which is executed during univention-backup2master.
It installs the provisioning-service-backend app on the new Primary Directory Node and
reinitializes the provisioning-service app.
Location of the script on a UCS system:
/usr/lib/univention-backup2master/post/50provisioning-service-backup2master
- On all remaining Backup Directoy Nodes:
- follow this article (specifically
ldap/masterneeds to be correct): https://help.univention.com/t/how-to-backup2master/19514 -executeunivention-app configure provisioning-service --set provisioning-service/udm-rest-api-host=<REPLACE_ME> --set provisioning-service/primary/url=<REPLACE_ME>"
- follow this article (specifically
- Restart all provisioning consumers (they usually just terminate and in k8s that's enough to trigger the automatic restart, but not in UCS).
The maintenance and update process consists of two primary manual workflows:
- Third-party dependency and image maintenance: Reviewing security scan results for third-party dependencies and updating image versions as needed to address security findings.
- Internal code change management: Executing all required follow-up steps after changes to internally developed code.
The first essential part of this workflow is our security monitoring. Security monitoring is performed using DependencyTrack, which periodically analyzes the Software Bill of Materials (SBOMs) for all container images used by us to identify known security vulnerabilities (CVEs).
When DependencyTrack reports that a package used in one of our container images is associated with a CVE, we first assess whether the vulnerability is applicable to our specific usage of the affected package ("triage"). If the vulnerability does not impact our use case, we document this assessment by creating a corresponding entry in a Rego chart, detailing the rationale for why the CVE is not relevant to the shipped software.
If the vulnerability is determined to be relevant, the affected container images must be updated to reference a package or library version that includes the corresponding fix. After updating the affected container images, new versions of N4K and the Provisioning Service app need to be released. The necessary manual steps for that are documented below.
If the NATS image version needs to be inscreased, changes must be made to two repositories: provisioning, nubus-helm.
The nats helm chart lives in this repository as a local file dependency of the provisioning helm chart and is only published as part of it.
The following steps must be performed:
- provisioning/helm/nats/values.yaml: update nats container image version -> bump
versionin provisioning/helm/nats/Chart.yaml and the matchingnatsdependency version in provisioning/helm/provisioning/Chart.yaml -> push -> merge -> new provisioning helm chart version generated by pipeline - nubus-helm/helm/nubus/Chart.yaml: update the provisioning helm chart version in Chart.yaml -> execute
helm dependeny update helm/nubus-> push -> merge -> automatic new nubus release - perform Provisioning Service app release for UCS
Security fixes for internally developed components of the Provisioning Service, i.e. Dispatcher, are
limited to the Python libraries they use. Library versions are managed via Python package manager
UV, so remediation involves updating the version number of the affected python library in the
pyproject.toml file of all affected components. After modifying a pyproject.toml, run: uv sync
once before pushing.
The following steps must be performed:
- update
pyproject.tomlof affected components ->uv sync-> push -> merge - perform Provisioning Service app release for UCS
All Python dependencies in this project are managed using the Python package manager UV. Any
changes to dependencies must be reflected in the relevant pyproject.toml files and accompanied by
updated lock files (uv sync) to ensure reproducible builds across environments.
Both apps release via the same app-release CI/CD component,
each behind its own protected tag pattern
so releasing one never rebuilds or republishes the other's artifacts:
provisioning-service(docker-app): tagvX.Y.Z, starting atv2.2.0. Also builds/signs/publishes container images and helm charts. App files:appcenter/provisioning-service/. Jobs are prefixedprovisioning-service-(provisioning-service-create_app_version, etc.).provisioning-service-backend: tagprovisioning-service-backend-vX.Y.Z, starting atprovisioning-service-backend-v2.0.3. Also builds theunivention-provisioning-service.deband uploads it into the app version. App files:appcenter/provisioning-service-backend/. Jobs are prefixedprovisioning-service-backend-(provisioning-service-backend-create_app_version, etc.).
Testing an App Center version from a merge request:
- On the MR pipeline, manually run
provisioning-service-create_app_version(orprovisioning-service-backend-create_app_version). It creates a temporary0.0.0-<branch-slug>version in the Test App - Install that version on a test UCS system from the Test App Center.
- The test version is deleted automatically when the MR is closed/merged or after 3 days (GitLab environment auto-stop).
Pipelines on main keep 999.0.0-staging up to date in the Test App Center for both apps.
Performing a release:
- Make sure
mainis at the commit you want to release. - Create and push a protected tag on that commit, e.g.
git tag -a v2.2.0 -m "Provisioning Service 2.2.0" && git push origin v2.2.0(provisioning-service-backend-vX.Y.Zfor the backend). - The tag pipeline creates the App Center version and uploads the app
files (docker-app: with digest-pinned compose images, backend: the built
.debpackage). - Verify the version in the Provider Portal / Test App Center: provisioning-service, provisioning-service-backend
- Trigger the manual
provisioning-service-do_release(orprovisioning-service-backend-do_release) job to copy the version from the Test App Center to the production App Center. - Confirm the manual
provisioning-service-check_release(orprovisioning-service-backend-check_release) job. - The pipeline creates the GitLab release
and sends the announcement mail to
[email protected].
Before releasing a new version of the Provisioning Service, all automated tests must be executed and their results reviewed.
The automated Kubernetes tests consist of multiple jobs within the nubus-helm pipeline and can be triggered manually. These jobs include smoke tests and end-to-end (E2E) tests.
Execute this Jenkins test for UCS.
All Provisioning Service containers, except the NATS container, are based on the ucs-base-image. A new ucs-base-image version with pinned apt cache is created every Thursday by a scheduled GitLab pipeline and includes errata updates from the regular UCS errata release process. The ucs-base-image version is automatically updated by Renovate Bot in this repository.