opravil-jan opened a new pull request, #126:
URL: https://github.com/apache/directory-studio/pull/126
## 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.
- The cause is an inverted check in `back-ldbm/cache.c`:
`slapi_entry_attr_find()` returns 0 when the attribute is found, so
`SLAPI_ENTRY_FLAG_REFERRAL` is never set.
- Reported with a reproducer and a fix as
https://github.com/389ds/389-ds-base/issues/8196.
- The nine core `Add/Modify/DeleteFollowsReferral` tests and the two UI
`testCreateEntryBelowReferralObject*` tests exclude 389ds until the test image
contains the fix. They still run against ApacheDS and OpenLDAP, as before (one
random server per run).
- The old `389ds/dirsrv:2.2` image contains 389ds 2.2.2, from before that
change.
- **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; a follow-up PR 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
- The pipeline on the ASF Jenkins agents: `docker.build` of the four images
and pulling from quay.io there.
- The Windows stage (unchanged).
- The test lab still does not run in GitHub Actions; see the proposal in
#125.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]