This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 6e0aa41 Limit local LDAP server to listening on localhost 6e0aa41 is described below commit 6e0aa416353fef0ecccca932d3d79f1c474bfad7 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Apr 15 16:48:50 2021 +0100 Limit local LDAP server to listening on localhost --- test/org/apache/catalina/realm/TestJNDIRealmIntegration.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/org/apache/catalina/realm/TestJNDIRealmIntegration.java b/test/org/apache/catalina/realm/TestJNDIRealmIntegration.java index cd69267..e52d7c2 100644 --- a/test/org/apache/catalina/realm/TestJNDIRealmIntegration.java +++ b/test/org/apache/catalina/realm/TestJNDIRealmIntegration.java @@ -16,6 +16,7 @@ */ package org.apache.catalina.realm; +import java.net.InetAddress; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -35,6 +36,7 @@ import org.apache.juli.logging.LogFactory; import com.unboundid.ldap.listener.InMemoryDirectoryServer; import com.unboundid.ldap.listener.InMemoryDirectoryServerConfig; +import com.unboundid.ldap.listener.InMemoryListenerConfig; import com.unboundid.ldap.sdk.AddRequest; import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.LDAPResult; @@ -130,6 +132,10 @@ public class TestJNDIRealmIntegration { @BeforeClass public static void createLDAP() throws Exception { InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig("dc=example,dc=com"); + InetAddress localhost = InetAddress.getByName("localhost"); + InMemoryListenerConfig listenerConfig = + new InMemoryListenerConfig("localListener", localhost, 0, null, null, null); + config.setListenerConfigs(listenerConfig); config.addAdditionalBindCredentials("cn=admin", "password"); ldapServer = new InMemoryDirectoryServer(config); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org