diff --git a/activemq-broker/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java b/activemq-broker/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java
index 2b89d12478..1b90e00f04 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java
@@ -102,7 +102,6 @@ public class LDAPAuthorizationMap implements AuthorizationMap {
initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
connectionURL = "ldap://localhost:10389";
connectionUsername = "uid=admin,ou=system";
- connectionPassword = "secret";
connectionProtocol = "s";
authentication = "simple";
@@ -491,4 +490,4 @@ public class LDAPAuthorizationMap implements AuthorizationMap {
return context;
}
-}
\ No newline at end of file
+}
diff --git a/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java b/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
index 44c23f6dad..77cbb203db 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
@@ -64,7 +64,7 @@ public class SimpleCachedLDAPAuthorizationMap implements AuthorizationMap {
private final String initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
private String connectionURL = "ldap://localhost:1024";
private String connectionUsername = "uid=admin,ou=system";
- private String connectionPassword = "secret";
+ private String connectionPassword;
private String connectionProtocol = "s";
private String authentication = "simple";
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java
index f696cb306f..2f00eff12c 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java
@@ -41,6 +41,7 @@ public class CachedLDAPAuthorizationModuleLegacyTest extends AbstractCachedLDAPA
protected SimpleCachedLDAPAuthorizationMap createMap() {
SimpleCachedLDAPAuthorizationMap map = super.createMap();
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
+ map.setConnectionPassword("secret");
return map;
}
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java
index 5d6f2e734f..5098b2571f 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java
@@ -39,6 +39,7 @@ public class CachedLDAPAuthorizationModuleTest extends AbstractCachedLDAPAuthori
protected SimpleCachedLDAPAuthorizationMap createMap() {
SimpleCachedLDAPAuthorizationMap map = super.createMap();
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
+ map.setConnectionPassword("secret");
return map;
}
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/security/LDAPAuthorizationMapTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/security/LDAPAuthorizationMapTest.java
index 130a0dadb1..f4fa8511e0 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/security/LDAPAuthorizationMapTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/security/LDAPAuthorizationMapTest.java
@@ -65,6 +65,7 @@ public class LDAPAuthorizationMapTest extends AbstractLdapTestUnit {
authMap.setQueueSearchMatchingFormat(new MessageFormat("uid={0},ou=queues,ou=destinations,o=ActiveMQ,ou=system"));
authMap.setAdvisorySearchBase("uid=ActiveMQ.Advisory,ou=topics,ou=destinations,o=ActiveMQ,ou=system");
authMap.setTempSearchBase("uid=ActiveMQ.Temp,ou=topics,ou=destinations,o=ActiveMQ,ou=system");
+ authMap.setConnectionPassword("secret");
}
@Test
diff --git a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds-legacy.xml b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds-legacy.xml
index 911acba553..a2e1ea3b5b 100644
--- a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds-legacy.xml
+++ b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds-legacy.xml
@@ -39,7 +39,7 @@
diff --git a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
index 67768c1491..f684ee1152 100644
--- a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
+++ b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
@@ -39,7 +39,7 @@