mirror of https://github.com/apache/activemq.git
Merge pull request #374 from coheigea/ldap_passwords
Remove default "secret" password from the LDAPAuthorizationMap
This commit is contained in:
commit
c3d9b388e4
|
@ -102,7 +102,6 @@ public class LDAPAuthorizationMap implements AuthorizationMap {
|
||||||
initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
|
initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
|
||||||
connectionURL = "ldap://localhost:10389";
|
connectionURL = "ldap://localhost:10389";
|
||||||
connectionUsername = "uid=admin,ou=system";
|
connectionUsername = "uid=admin,ou=system";
|
||||||
connectionPassword = "secret";
|
|
||||||
connectionProtocol = "s";
|
connectionProtocol = "s";
|
||||||
authentication = "simple";
|
authentication = "simple";
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class SimpleCachedLDAPAuthorizationMap implements AuthorizationMap {
|
||||||
private final String initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
|
private final String initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
|
||||||
private String connectionURL = "ldap://localhost:1024";
|
private String connectionURL = "ldap://localhost:1024";
|
||||||
private String connectionUsername = "uid=admin,ou=system";
|
private String connectionUsername = "uid=admin,ou=system";
|
||||||
private String connectionPassword = "secret";
|
private String connectionPassword;
|
||||||
private String connectionProtocol = "s";
|
private String connectionProtocol = "s";
|
||||||
private String authentication = "simple";
|
private String authentication = "simple";
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class CachedLDAPAuthorizationModuleLegacyTest extends AbstractCachedLDAPA
|
||||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||||
SimpleCachedLDAPAuthorizationMap map = super.createMap();
|
SimpleCachedLDAPAuthorizationMap map = super.createMap();
|
||||||
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
|
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
|
||||||
|
map.setConnectionPassword("secret");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class CachedLDAPAuthorizationModuleTest extends AbstractCachedLDAPAuthori
|
||||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||||
SimpleCachedLDAPAuthorizationMap map = super.createMap();
|
SimpleCachedLDAPAuthorizationMap map = super.createMap();
|
||||||
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
|
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
|
||||||
|
map.setConnectionPassword("secret");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class LDAPAuthorizationMapTest extends AbstractLdapTestUnit {
|
||||||
authMap.setQueueSearchMatchingFormat(new MessageFormat("uid={0},ou=queues,ou=destinations,o=ActiveMQ,ou=system"));
|
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.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.setTempSearchBase("uid=ActiveMQ.Temp,ou=topics,ou=destinations,o=ActiveMQ,ou=system");
|
||||||
|
authMap.setConnectionPassword("secret");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<authorizationPlugin>
|
<authorizationPlugin>
|
||||||
<map>
|
<map>
|
||||||
<cachedLDAPAuthorizationMap connectionURL="ldap://localhost:${ldapPort}"/>
|
<cachedLDAPAuthorizationMap connectionURL="ldap://localhost:${ldapPort}" connectionPassword="secret" />
|
||||||
</map>
|
</map>
|
||||||
</authorizationPlugin>
|
</authorizationPlugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<authorizationPlugin>
|
<authorizationPlugin>
|
||||||
<map>
|
<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>
|
</map>
|
||||||
</authorizationPlugin>
|
</authorizationPlugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
Loading…
Reference in New Issue