This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 7168281 Limit local LDAP server to listening on localhost 7168281 is described below commit 71682811e52ea6f0413ee7300f1234ac99700026 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