You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ba...@apache.org on 2026/08/12 15:36:25 UTC
(jackrabbit-oak) branch OAK-12354 updated: OAK-12354: Use contemporary crypto algorithms for testing in oak-auth-ldap
This is an automated email from the ASF dual-hosted git repository.
mbaedke pushed a commit to branch OAK-12354
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/OAK-12354 by this push:
new f326bbc69a OAK-12354: Use contemporary crypto algorithms for testing in oak-auth-ldap
f326bbc69a is described below
commit f326bbc69a89dabb65f1e723aa05a69d8792f914
Author: Manfred Baedke <ma...@gmail.com>
AuthorDate: Wed Aug 12 17:33:31 2026 +0200
OAK-12354: Use contemporary crypto algorithms for testing in oak-auth-ldap
Using PKCS12 keystore and RSA-2048/SHA256withRSA now.
---
.../oak/security/authentication/ldap/AbstractServer.java | 10 +++++++++-
.../oak/security/authentication/ldap/apacheds-server.p12 | Bin 0 -> 2568 bytes
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/AbstractServer.java b/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/AbstractServer.java
index f3b89c3480..9fd54be316 100644
--- a/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/AbstractServer.java
+++ b/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/AbstractServer.java
@@ -28,6 +28,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.BindException;
+import java.net.URL;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Collections;
@@ -81,6 +82,8 @@ import org.slf4j.LoggerFactory;
public abstract class AbstractServer {
public static final String EXAMPLE_DN = "dc=example,dc=com";
+ private static final String TLS_KEYSTORE_RESOURCE = "org/apache/jackrabbit/oak/security/authentication/ldap/apacheds-server.p12";
+ private static final String TLS_KEYSTORE_PASSWORD = "secret";
private static final Logger LOG = LoggerFactory.getLogger(AbstractServer.class);
private static final List<LdifEntry> EMPTY_LIST = Collections.unmodifiableList(new ArrayList<LdifEntry>(0));
@@ -230,7 +233,12 @@ public abstract class AbstractServer {
protected void setupLdapServer() throws Exception {
TcpTransport transport = new TcpTransport((port));
transport.enableSSL(enableSSL);
-
+ URL keyStoreUrl = AbstractServer.class.getClassLoader().getResource(TLS_KEYSTORE_RESOURCE);
+ if (keyStoreUrl == null) {
+ throw new IOException("Unable to locate test TLS keystore: " + TLS_KEYSTORE_RESOURCE);
+ }
+ ldapServer.setKeystoreFile(new File(keyStoreUrl.toURI()).getAbsolutePath());
+ ldapServer.setCertificatePassword(TLS_KEYSTORE_PASSWORD);
ldapServer.setTransports(transport);
ldapServer.setDirectoryService(directoryService);
ldapServer.addExtendedOperationHandler(new StartTlsHandler());
diff --git a/oak-auth-ldap/src/test/resources/org/apache/jackrabbit/oak/security/authentication/ldap/apacheds-server.p12 b/oak-auth-ldap/src/test/resources/org/apache/jackrabbit/oak/security/authentication/ldap/apacheds-server.p12
new file mode 100644
index 0000000000..83ee8f258b
Binary files /dev/null and b/oak-auth-ldap/src/test/resources/org/apache/jackrabbit/oak/security/authentication/ldap/apacheds-server.p12 differ