Problem: OX Connector - Context Provisioning Fails with “Authentication Failed”

Problem

The OX Connector on Univention Corporate Server (UCS) fails to provision a new Open-Xchange (OX) context. Previously created contexts may have been provisioned successfully.

The failure occurs regardless of how the context is created:

  • Through the AD Connector
  • Through the UCS management interface
  • Using the udm command-line tool

The connector repeatedly attempts to process the affected context, but OX returns an authentication error. The task’s error counter increases with subsequent attempts.

Although the problem may first appear when creating a third context, the error shown below does not indicate a limit on the number of contexts.

Complete reported log

The following is the complete reported log excerpt. The LDAP distinguished name, object UUID, and exception identifier have been replaced with placeholders. No passwords or secrets are included.

2026-10-15 18:38:15 INFO    Task cn=<CONTEXT_NAME>,cn=open-xchange,dc=<DOMAIN_COMPONENT_1>,dc=<DOMAIN_COMPONENT_2>,dc=<DOMAIN_COMPONENT_3> (<OBJECT_UUID>; oxmail/oxcontext; tasks:1) now has an error count of 7
2026-10-15 18:38:15 INFO    Error while handling cn=<CONTEXT_NAME>,cn=open-xchange,dc=<DOMAIN_COMPONENT_1>,dc=<DOMAIN_COMPONENT_2>,dc=<DOMAIN_COMPONENT_3> (<OBJECT_UUID>; oxmail/oxcontext; tasks:1)
2026-10-15 18:38:15 INFO    Authentication failed; exceptionId <EXCEPTION_ID>
2026-10-15 18:38:15 INFO    Traceback (most recent call last):
2026-10-15 18:38:15 INFO      File "/tmp/univention-ox-connector.listener_trigger", line 172, in main
2026-10-15 18:38:15 INFO        run(obj)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/__init__.py", line 90, in run
2026-10-15 18:38:15 INFO        create_context(obj)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/contexts.py", line 63, in create_context
2026-10-15 18:38:15 INFO        if context_exists(obj):
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/contexts.py", line 58, in context_exists
2026-10-15 18:38:15 INFO        return bool(get_obj_by_name_from_ox(Context, context_id, None))
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/helpers.py", line 58, in get_obj_by_name_from_ox
2026-10-15 18:38:15 INFO        return klass.from_ox(context_id, name=name)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/univention/ox/soap/backend.py", line 390, in from_ox
2026-10-15 18:38:15 INFO        soap_obj = context_service.get_data(context_obj)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/univention/ox/soap/services.py", line 540, in get_data
2026-10-15 18:38:15 INFO        return self._call_ox(
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/tenacity/__init__.py", line 338, in wrapped_f
2026-10-15 18:38:15 INFO        return copy(f, *args, **kw)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/tenacity/__init__.py", line 477, in __call__
2026-10-15 18:38:15 INFO        do = self.iter(retry_state=retry_state)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/tenacity/__init__.py", line 378, in iter
2026-10-15 18:38:15 INFO        result = action(retry_state)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/tenacity/__init__.py", line 400, in <lambda>
2026-10-15 18:38:15 INFO        self._add_action_func(lambda rs: rs.outcome.result())
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/concurrent/futures/_base.py", line 439, in result
2026-10-15 18:38:15 INFO        return self.__get_result()
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
2026-10-15 18:38:15 INFO        raise self._exception
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/tenacity/__init__.py", line 480, in __call__
2026-10-15 18:38:15 INFO        result = fn(*args, **kwargs)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/univention/ox/soap/services.py", line 220, in _call_ox
2026-10-15 18:38:15 INFO        return getattr(service, func)(**kwargs)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/zeep/proxy.py", line 46, in __call__
2026-10-15 18:38:15 INFO        return self._proxy._binding.send(
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 135, in send
2026-10-15 18:38:15 INFO        return self.process_reply(client, operation_obj, response)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply
2026-10-15 18:38:15 INFO        return self.process_error(doc, operation)
2026-10-15 18:38:15 INFO      File "/usr/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 329, in process_error
2026-10-15 18:38:15 INFO        raise Fault(
2026-10-15 18:38:15 INFO    zeep.exceptions.Fault: Authentication failed; exceptionId <EXCEPTION_ID>

The critical part is the combination of:

create_context → context_exists → context_service.get_data

and:

zeep.exceptions.Fault: Authentication failed

This shows that the request fails during the context existence check, before the connector attempts to create the context.


Root Cause

In the confirmed case, the master password used by the OX Connector did not match the master password accepted by OX.

The connector requires valid OX master administrator credentials for context-level operations. Before creating a context, it queries OX to determine whether that context already exists. OX rejects this query if the supplied master username or password is invalid.

The resulting sequence is:

Context is created in UCS
    ↓
OX Connector receives the provisioning task
    ↓
Connector checks whether the context exists in OX
    ↓
Connector sends the configured master credentials
    ↓
OX rejects authentication
    ↓
Provisioning stops before context creation

Why all creation methods are affected

The AD Connector, the UCS management interface, and the udm command-line tool provide different ways to create or update directory objects.

They do not provide separate authentication paths from the OX Connector to OX. Once the context object reaches the connector, the same provisioning implementation processes it.

Consequently, changing the method used to create the LDAP object does not resolve an OX master credential mismatch.


Investigation

The following investigation applies to the UCS App Center deployment of the OX Connector. File paths and line numbers can vary between versions.

1. Identify which administrator credentials are required

The connector distinguishes between two credential types:

Credential type Purpose Relevance to this error
OX master administrator credentials Context-level administration, including the existence check shown in the traceback Required for the failing request
Context administrator credentials Administrative operations within a particular context Not used by the failing context existence check

The master administrator is commonly named oxadminmaster, but installations may use a different account.

Do not substitute a context administrator or an ordinary OX user account for the configured master administrator.

2. Trace the failing request in the connector

The provisioning handler first checks whether the context already exists.

In univention/ox/provisioning/contexts.py, the relevant logic is:

def create_context(obj):
    ...
    if context_exists(obj):
        ...
    ...
    context.create()

The existence check calls the SOAP backend to retrieve the context. In univention/ox/soap/services.py, the context service explicitly supplies master credentials:

return self._call_ox(
    'getData',
    ctx=context_obj,
    auth=self.credentials.master_credentials,
)

This is the decisive distinction: the failing request does not authenticate with the administrator of the context being created.

The SOAP client receives an error response from OX, which Zeep exposes as a Fault. The presence of Zeep and Tenacity in the traceback does not, by itself, indicate a defect in either library.

3. Understand where the master credentials come from

For the UCS deployment, the configuration flow is:

UCS App Center settings
    OX_MASTER_ADMIN
    OX_MASTER_PASSWORD
            ↓
Connector container environment
            ↓
Container startup script
            ↓
Credentials file: "master" entry
            ↓
SOAP authentication sent to OX

Persistent App Center settings

The relevant settings are:

  • OX_MASTER_ADMIN: Username of the OX master administrator
  • OX_MASTER_PASSWORD: Password of that administrator
  • OX_SOAP_SERVER: OX SOAP endpoint contacted by the connector

The password must match the credential accepted by the OX system addressed by OX_SOAP_SERVER.

Credentials file

The UCS app sets OX_CREDENTIALS_FILE to:

/var/lib/univention-appcenter/apps/ox-connector/data/secrets/contexts.json

The master credentials are stored under the "master" key. The following example contains placeholders only:

{
  "master": {
    "adminuser": "<OX_MASTER_ADMIN_USERNAME>",
    "adminpass": "<REDACTED_MASTER_PASSWORD>"
  }
}

The file also contains credentials for individual contexts. Those entries must be preserved.

Startup behavior

The connector’s appcenter-entrypoint.sh reads OX_MASTER_ADMIN and OX_MASTER_PASSWORD from the container environment and writes them into the credentials file’s "master" entry.

Existing entries for individual contexts are retained.

This has an important operational consequence:

Editing only the "master" entry in contexts.json is not a durable configuration change. The next container start can overwrite it with the values from the configured environment.

Runtime lookup and caching

The SOAP credential implementation calls:

get_master_credentials()

The configuration module resolves this to:

get_credentials_for_context("master")

The credentials file is loaded into an in-memory cache. Manually changing the file does not necessarily update credentials already loaded by a running process.

The supported App Center configuration workflow avoids relying on either a manual file edit or an in-process cache refresh.

4. Distinguish OX container variables from connector settings

Some OX container images expose variables such as:

ox_master_admin=<REDACTED_USERNAME>
ox_master_password=<REDACTED_PASSWORD>

These lower-case names are not the same settings as the connector’s upper-case OX_MASTER_ADMIN and OX_MASTER_PASSWORD.

Their behavior depends on the OX image. They may be used during initialization rather than continuously synchronizing the active OX password.

Therefore:

  • An environment variable alone does not prove which password OX currently accepts.
  • Changing an OX container environment variable does not necessarily change the active OX master password.
  • The connector must be configured with the master credentials currently accepted by the target OX installation.

This article describes updating the connector-side credential, not resetting the master password on OX.

5. Correlate the failure with OX logs

If the cause remains unclear, locate the corresponding OX server log entry using:

  • The timestamp of the failed request
  • The exceptionId returned in the connector log

The exception identifier links the connector-side SOAP error to its server-side details. It is not a context identifier or a context-limit indicator.

For deployments with multiple OX application nodes, check the logs on the node that handled the request, or search the centralized logs.

Do not publish complete credentials files, environment dumps, SOAP payloads, or unredacted configuration excerpts. They may contain passwords or other sensitive data.


Solution

1. Confirm the valid OX master credentials

Before changing the connector configuration, establish:

  1. Which OX system the connector should contact.
  2. Which master administrator account is valid on that system.
  3. The current password accepted for that account.

Obtain the password through the organization’s approved secret-management process. Do not include it in support tickets or public documentation.

If the valid OX password is already known, there is no need to reset it on OX merely to correct the connector configuration.

2. Update the OX Connector password

Run the following command as root on the UCS host running the OX Connector, not inside the OX container:

univention-app configure ox-connector --set OX_MASTER_PASSWORD='<CURRENT_OX_MASTER_PASSWORD>'

Replace <CURRENT_OX_MASTER_PASSWORD> with the actual password accepted by OX. The placeholder is not a literal value.

3. Allow the configuration workflow to reinitialize the container

A separate manual restart is not required for the documented App Center configuration workflow.

The repository documents that univention-app configure reinitializes the connector container with the changed settings. During startup, the entry point writes the updated master credentials into contexts.json.

This also starts new processes that load the updated credentials rather than continuing to use previously cached values.

Plan the change for an appropriate operational window because container reinitialization temporarily interrupts connector processing.

4. Verify that provisioning resumes

After the configuration command completes:

  1. Confirm that the connector is running.
  2. Monitor its log during the next processing attempt.
  3. Check whether the affected context is provisioned in OX.
  4. Confirm that no new Authentication failed messages are generated for that task.

The affected task may still be pending. Correct the credentials first and observe its subsequent processing.

Do not delete and recreate the LDAP context as an initial recovery step. Recreating the object does not repair authentication and can introduce unnecessary provisioning work.