Skip to content

Build pinned, current test lab images for the Jenkins integration tests - #126

Draft
opravil-jan wants to merge 14 commits into
apache:masterfrom
opravil-jan:ci/testlab-images
Draft

opravil-jan wants to merge 14 commits into
apache:masterfrom
opravil-jan:ci/testlab-images

Conversation

@opravil-jan

@opravil-jan opravil-jan commented Nov 30, 2026 •

Copy link
Copy Markdown

Summary

This PR updates the Jenkins test lab to current server images and makes it reproducible. Every image is built from a Dockerfile in tools/testlab that pins its base image by version and digest, and Dependabot proposes updates. A new upstream image, or a package repository change, can no longer change or break the test lab unnoticed.

It builds on #125 and contains its commits; review the last commit only, or merge #125 first.

Changes

Server Before After
Build image eclipse-temurin:21-jdk-noble (floating) eclipse-temurin:21.0.13.1_2-jdk-noble@sha256:…
Kerby coheigea/kerby (floating latest) coheigea/kerby:latest@sha256:… (the only published tag, from 2019)
OpenLDAP osixia/openldap:1.5.0 (2021) osixia/openldap:2.6.15@sha256:… + SASL plugins
389ds 389ds/dirsrv:2.2 + openSUSE Tumbleweed packages installed at every start quay.io/389ds/dirsrv:c9s@sha256:… (389-ds-base 2.6.1), nothing installed at start
  • OpenLDAP 2.x (tools/testlab/openldap/Dockerfile):
    • The image ships only PLAIN and ANONYMOUS, so the Dockerfile adds the Alpine CRAM-MD5, DIGEST-MD5 and GSSAPI SASL plugins.
    • It also adds a self-signed certificate and the test credentials as salted hashes. The 2.x image generates random passwords otherwise.
    • Its listeners are 3890/6360, so the pipeline passes OPENLDAP_PORT=3890 and OPENLDAP_PORT_SSL=6360.
    • OpenLDAP 2.x is built with OpenSSL instead of GnuTLS, so OpenLdapConfig.ldif now sets olcTLSCipherSuite in OpenSSL syntax, with the same intent: strong ciphers without RSA key exchange, DSS or Camellia.
    • The image does not enable the OpenSSL 3 legacy provider, so RC4 and DES are not available; see the DIGEST-MD5 item below.
    • New passwords are hashed with {SSHA} as in the 1.x image. Studio's password dialog cannot verify the 2.x default {ARGON2}, which broke the password modify UI tests.
    • The Alpine Cyrus GSSAPI plugin is built with Heimdal and reports ssf=56 for any Kerberos encryption type (the test keytab uses AES-128). The two GSSAPI auth-conf UI tests without TLS now require ssf 56 instead of 128 from OpenLDAP. That still requires a confidentiality layer; integrity alone is ssf 1.
  • 389ds 2.6.1 (tools/testlab/389ds/Dockerfile):
    • The CentOS Stream 9 image already contains the SASL plugins.
    • This removes the runtime download from openSUSE Tumbleweed, which broke the pipeline when openSUSE rotated its signing key and needed --replacefiles (with a glibc upgrade inside the container).
    • 389ds/dirsrv:2.3 cannot be used: its image lacks the Python cryptography module, so dscontainer does not start.
  • 389ds referral bug. Since the change for 389ds issue 4308 (2022), 389ds does not return smart referrals for base searches or for add, modify and delete on or below a referral entry.
  • DIGEST-MD5 security layers (auth-int is fine, auth-conf is not). DIGEST-MD5 encrypts with 3DES, RC4 or DES. All three are broken or disallowed (NIST SP 800-131A Rev. 2, RFC 7465), and DIGEST-MD5 itself is historic (RFC 6331).
    • The Java client picks 3DES whenever the server allows it. The Cyrus SASL 2.1.28 DIGEST-MD5 plugin with OpenSSL 3 cannot init that cipher, neither in the 389ds image (CentOS Stream 9; the openSUSE build before failed the same way) nor in the OpenLDAP image (Alpine).
    • RC4 and DES are only in the OpenSSL 3 legacy provider. The test images deliberately do not enable it, so they don't allow broken ciphers.
    • The Alpine plugin logs couldn't init cipher but still returns a successful bind. The connection breaks at the first wrapped message and slapd may crash; it did once during the UI tests. So the core auth-conf tests against OpenLDAP passed without a working security layer.
    • The core DIGEST-MD5 auth-conf tests now exclude OpenLDAP and 389ds and run against ApacheDS only.
    • The two UI DIGEST-MD5 auth-conf tests have no server left (ApacheDS is excluded for its SASL filter bug), so they are @Disabled with the reason.
    • Whether Studio should keep offering DIGEST-MD5 at all is a separate question; Remove DIGEST-MD5 authentication from LDAP connections #127 proposes removing it.
  • The exclusion reasons (CYRUS_SASL_NO_3DES, FEDORA_389DS_NO_REFERRALS) moved to TestFixture, so the core and UI tests share them, with their removal conditions.
  • Dependabot now also watches tools/testlab/* (the docker ecosystem). Java major updates of the build image are ignored, because the build stays on the Java 21 LTS line.
  • tools/testlab/README.md describes the images and the new OpenLDAP ports.

Testing

The Jenkins Linux stage, reproduced locally:

  • All four images were built from the new Dockerfiles and started with the same arguments as the Jenkinsfile on one Docker network.
  • The build ran in the build image with the caller's uid, the workspace path, and the same environment and commands as the pipeline.

Results of the full build:

  • Core integration tests: 105 run, 0 failures, 1 skipped. This is 110 before: the DIGEST-MD5 auth-conf runs against OpenLDAP are now excluded.
  • UI tests: 433 run, 0 failures, 1 error, 10 skipped.
    • The error was a 20 s SWTBot timeout in testCreateConnectionStartTlsEncryptionSimpleAuthOK, while the host was under heavy disk load (load average about 25).
    • A rerun of NewConnectionWizardTest and NewEntryWizardTest passed: 69 run, 0 failures. The previous full run, before the legacy provider was removed, passed all 433 UI tests.
  • All three servers were still running at the end. In an earlier run with the legacy provider and without the 3DES exclusion, slapd crashed during the UI tests.

Not verified

🤖 Generated with Claude Code

opravil-jan and others added 14 commits November 25, 2026 19:01
The antlr-maven-plugin runs antlr.Tool in-process and traps its
System.exit() with a SecurityManager. Java 18+ no longer allows
installing a SecurityManager, so the OpenLDAP ACL editor does not build
on current JDKs.

Run antlr.Tool with exec-maven-plugin in a separate JVM instead and add
the generated sources with build-helper in pom-first.xml. The
exec-maven-plugin version is now managed in the root POM (3.7.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eclipse 4.41 requires Java 21, so the build and the product now target
Java 21 (maven.compiler.release, osgi.requiredJavaVersion).

Build:
- Tycho 2.3.0 -> 5.0.4 (needs Maven 3.9.9+), parent POM 48 -> 52.
- pom-first.xml of the target platform uses 'pom' packaging, because
  Tycho 5 resolves an eclipse-target-definition before the local p2
  repository it refers to has been built. The generated .target is
  attached with build-helper, so it is still installed.

Target platform:
- Eclipse 4.41, SWTBot 4.3.0, Orbit 4.41, Babel R0.20.0.
- Drop what Eclipse 4.41 no longer ships: javax.xml,
  javax.xml.stream, jdt.launching.macosx, org.eclipse.osgi.services,
  source features, explicit EMF/ECF product features and missing
  Babel fragments.
- dom4j from Orbit (org.dom4j 2.2.0) instead of the ServiceMix bundle,
  whose javax.xml.stream [1.0,2) import no longer resolves cleanly.
- slf4j-api 1.7.36 is published locally (LDAP API and ApacheDS import
  [1.7,1.8), Eclipse ships 2.x); slf4j-nop only satisfies
  org.slf4j.impl while the target is resolved.
- commons-logging 1.2 is published locally for httpclient.

Libraries: commons-codec 1.23.0, collections4 4.6.0, io 2.22.0,
lang3 3.22.0, pool2 2.13.1, text 1.15.0, httpclient 4.5.14,
httpcore 4.4.16, BouncyCastle 1.87 (jdk18on + bcutil), Caffeine 2.9.3,
MINA 2.1.15, slf4j 1.7.36, JUnit 5.14.4 / Platform 1.14.4,
hamcrest 3.0.0, skin 1.0.3.

LDAP API stays on 2.1.0 and MINA on 2.1.x: ApacheDS 2.0.0.AM26 uses
SslFilter.DISABLE_ENCRYPTION_ONCE (removed in MINA 2.2) and LDAP API
2.1.1+ requires MINA 2.2. ApacheDS 2.0.0.AM27 cannot be used because
several of its bundles miss an Import-Package for
org.apache.directory.api.ldap.model.schema.registries.

Code: replace the removed IPageLayout.ID_RES_NAV and
setShowFastViewBars APIs.

BREAKING CHANGE: building and running Directory Studio requires Java 21.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POI 3.9 -> 6.0.0 for the XLS export. POI 5+ needs commons-math3,
  SparseBitSet and log4j-api, which are embedded next to it, and
  commons-io, commons-codec and commons-collections4 packages, which
  are imported. ExportXlsRunnable uses CellType instead of the removed
  CELL_TYPE_* constants. The embedded jar names now come from the
  version properties.
- xerces 2.11.0 -> 2.12.2 (embedded in ldapbrowser.core).
- FOP and xmlgraphics-commons 2.9 -> 2.12, xalan 2.7.2 -> 2.7.3 plus
  its serializer, which is a separate artifact since 2.7.3, and
  ant-apache-regexp 1.10.14 -> 1.10.18 for the help and user guide
  generation.

odftoolkit stays on 0.8.8 / 0.7: odfdom 0.13 pulls about 20 additional
jars and should be a separate change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build requires Java 21, so the GitHub workflows now build with
JDK 21 and 25 (the JDK 11 workflow is removed, the JDK 17 one becomes
JDK 25) and the Jenkins stages run on Java 21 only.

Update actions/checkout to v7.0.1, actions/setup-java to v6.3.0,
actions/upload-artifact to v7.0.2, github/codeql-action to v4.39.5 and
ossf/scorecard-action to v2.6.0, keeping each workflow's existing
pinning style (SHA in the build and Scorecard workflows, version tags
in CodeQL). CodeQL now sets up JDK 21 explicitly instead of relying on
the runner's default JDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit 9f40267 (German translation improvements) replaced the
hard-coded view and category name "LDAP Servers" with
%View_ServersView_name, which is "Servers" in plugin.properties. That
renamed the view and its Show View category in the English UI, and
the UI tests no longer found the "LDAP Servers" view.

Set the English view name back to "LDAP Servers" and use the existing
View_Category_name key for the category. The German names are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The product now contains two slf4j.api bundles: 1.7.36 for the LDAP API
and ApacheDS, and 2.x from the Eclipse platform. The template editor
and the OpenLDAP ACL editor imported org.slf4j without a version, so
they could be wired to slf4j 2.x and bypass the slf4j-eclipselog
binding. Use the same range as the LDAP API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two problems in the dependencies update site (p2repositories/dependencies),
which mirrors the local target platform repository:

- org.dom4j comes from Eclipse Orbit and was missing from the update
  site, so installing the LDAP Browser into an Eclipse IDE failed on
  the org.dom4j import. Mirror that one IU from Orbit as well.
- slf4j-nop, needed only to resolve the target platform, was published,
  so p2 could pick it as the org.slf4j.impl provider and drop all LDAP
  API logging. Publish it into a separate resolution-only repository
  that is not mirrored.

Also define the versions that were written twice (dom4j, ServiceMix
ANTLR, JUnit, the Orbit URL) once as properties, and note in the rcp
feature that its slf4j.api version must match org.slf4j.bundleversion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tycho 5 needs Maven 3.9.9 or newer, but not 3.10: Maven 3.10.x
(Resolver 2.0) fails to resolve the bundles' dependencies with
"Invalid Collect Request: null". The build environments have neither:
the Jenkins image apachedirectory/maven-build:jdk-21 ships Maven 3.9.6
and GitHub's Ubuntu runners ship Maven 3.10.1.

Add the Maven Wrapper (only-script, with the distribution's SHA-256
checksum) and use it in Jenkins, the CodeQL workflow, build.sh,
build.bat and the build instructions. The testlab instructions now
use the jdk-21 image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Eclipse 4.41 labels the menu item "Preferences..." and titles the
  new wizard dialog "New" (the page title is "Select a wizard").
- Since ea38b9c a new (empty) DN value is edited in multi-select mode:
  a list with Add and Remove buttons instead of a combo with Browse.
  The DN editor bot gets an Add button and a list accessor; the entry
  editor and alias entry tests use them for new values. Existing
  values still use the single-DN dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SWTBot UI tests were never run by the GitHub workflows, and the
Jenkins pipeline stops before them because of failing core
integration tests against OpenLDAP/389ds.

Run the main build with -Denable-ui-tests under xvfb-run with metacity.
The tests need a window manager: without one, no shell is active
after a dialog closes. On failure, upload the surefire reports and the
UI test screenshots. Both workflows now use the Maven Wrapper. The
README explains how to run the UI tests locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Java DIGEST-MD5 client picks the 3DES cipher for auth-conf, and the
Cyrus SASL DIGEST-MD5 plugin that the 389ds test image installs from
openSUSE fails with "failed to init cipher '3des'" (RC4 and DES work).
Exclude 389ds from the three tests that request auth-conf until 3DES
works again in that plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apachedirectory/maven-build:jdk-21 is published for arm64 only, so it
cannot run on the amd64 agents, and it has no window manager for the UI
tests. The pipeline now builds tools/testlab/build-image (Temurin 21,
GTK, Xvfb, metacity, dbus, krb5-user) and runs the build like the
GitHub workflows: xvfb-run, dbus-run-session and metacity. HOME and
user.home point to /tmp/home, because the Jenkins user has no home
directory in the image.

The 389ds container installs the DIGEST-MD5 and GSSAPI SASL plugins at
start. Since openSUSE rotated its signing key in 2026, zypper skipped
every repository, the plugins were missing and the SASL tests against
389ds failed. Import the current key first, and use --replacefiles,
because the current packages conflict with OpenSSL 1.1 in the 2.2 image.
389ds stays on 2.2: 2.4 and later answer operations below a referral
entry with noSuchObject instead of a referral.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test lab pulled floating images and installed openSUSE Tumbleweed
packages into a 2022 389ds image at every start, so upstream changes
broke the Jenkins pipeline. Each server is now built from a Dockerfile
in tools/testlab that pins its base image by version and digest, and
Dependabot proposes updates.

- OpenLDAP 1.5.0 -> osixia/openldap 2.6.15: adds the CRAM-MD5,
  DIGEST-MD5 and GSSAPI SASL plugins, a self-signed certificate, the
  test credentials, {SSHA} password hashing and the OpenSSL 3 legacy
  provider for the DIGEST-MD5 RC4 and DES layers. The test config uses
  OpenSSL cipher syntax.
- 389ds 2.2 -> quay.io/389ds/dirsrv:c9s (2.6.1), which ships the SASL
  plugins. Its update-through-referral tests exclude 389ds until
  389ds/389-ds-base#8196 is fixed.
- Kerby and the build image are pinned by digest.
- DIGEST-MD5 auth-conf with 3DES fails with the Cyrus SASL plugins of
  both images, so those tests exclude them; the GSSAPI auth-conf UI
  tests require ssf 56, which the Heimdal-based plugin reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The OpenLDAP test image enabled the OpenSSL 3 legacy provider so that
the Cyrus DIGEST-MD5 plugin could use RC4 and DES. These ciphers are
broken, as is the 3DES the Java client otherwise picks and the plugin
cannot init, and DIGEST-MD5 itself is historic (RFC 6331). The test
images no longer enable the legacy provider. The DIGEST-MD5 auth-conf
tests now exclude OpenLDAP as well, and the UI tests with no server
left are disabled with the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant