Merge pull request #374 from coheigea/ldap_passwords

Remove default "secret" password from the LDAPAuthorizationMap
This commit is contained in:
Jean-Baptiste Onofré 2019-07-25 10:56:08 +02:00 committed by GitHub
commit c3d9b388e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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";
@ -491,4 +490,4 @@ public class LDAPAuthorizationMap implements AuthorizationMap {
return context;
}
}
}

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>