Remove default "secret" password from the LDAPAuthorizationMap

This commit is contained in:
Colm O hEigeartaigh 2019-07-15 18:24:48 +01:00
parent 379853d887
commit 75023f2bed
7 changed files with 7 additions and 5 deletions

View File

@ -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";

View File

@ -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";

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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

View File

@ -39,7 +39,7 @@
<authorizationPlugin>
<map>
<cachedLDAPAuthorizationMap connectionURL="ldap://localhost:${ldapPort}"/>
<cachedLDAPAuthorizationMap connectionURL="ldap://localhost:${ldapPort}" connectionPassword="secret" />
</map>
</authorizationPlugin>
</plugins>

View File

@ -39,7 +39,7 @@
<authorizationPlugin>
<map>
<cachedLDAPAuthorizationMap legacyGroupMapping="false" connectionURL="ldap://localhost:${ldapPort}" groupClass="org.apache.activemq.jaas.GroupPrincipal"/>
<cachedLDAPAuthorizationMap legacyGroupMapping="false" connectionURL="ldap://localhost:${ldapPort}" groupClass="org.apache.activemq.jaas.GroupPrincipal" connectionPassword="secret" />
</map>
</authorizationPlugin>
</plugins>