Repository navigation
Remove DIGEST-MD5 authentication from LDAP connections - #127
Open
opravil-jan wants to merge 15 commits into
Open
opravil-jan wants to merge 15 commits into
opravil-jan wants to merge 15 commits into
Conversation
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>
DIGEST-MD5 is historic (RFC 6331) and its security layer ciphers 3DES, RC4 and DES are broken or disallowed. Current servers can no longer use them: OpenSSL 3 has RC4 and DES only in its legacy provider, and the Cyrus SASL DIGEST-MD5 plugin fails to init 3DES, which the Java client picks. The connection wizard and properties no longer offer DIGEST-MD5 or the SASL realm field. AuthenticationMethod.SASL_DIGEST_MD5 stays, deprecated, so stored connections and LDAP URLs still load. Binding with it fails with a message to choose another method, and its properties can only be applied after another method is chosen. The connection properties now show an error of any tab when they open and clear it once it is fixed. The ApacheDS and OpenLDAP configuration editors keep DIGEST-MD5, since server configurations may still use it. BREAKING CHANGE: DIGEST-MD5 connections no longer bind; users need to choose another authentication method, such as Simple authentication with StartTLS or LDAPS, or GSSAPI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes DIGEST-MD5 as an authentication method for LDAP connections.
Simple authentication over StartTLS or LDAPS, or GSSAPI, are the secure alternatives.
It builds on #126 (and #125) and contains their commits; review the last commit only, or merge those first.
Changes
AuthenticationMethod.SASL_DIGEST_MD5remains, deprecated. Stored connections and LDAP URLs (X-AUTH-METHOD=DIGEST-MD5) that use it still load, and nothing is changed silently:Testing
The Jenkins Linux stage was reproduced locally with the pinned test lab.
The full build passed apart from one UI test (27:53 min):
BrowserTest.testBrowseWithPagingWithScrollMode: a 40 s timeout waiting for the Read Attributes job. That test is not related to this change and passed in the four earlier full runs.BrowserTestpassed: 28 run, 0 failures each.ConnectionViewTest.testConnectionWithDigestMd5RequiresAnotherAuthenticationMethodfailed before the connection properties validation fix and passes with it.Migration
Users with DIGEST-MD5 connections need to choose another method; Studio tells them when they open the connection or its properties.
🤖 Generated with Claude Code