Bug#501650: Disable alias dereferencing when ATS server searches for user in
LDAP server.
This commit is contained in:
parent
21ba1ead80
commit
8794590e50
@ -191,6 +191,7 @@ public final class PwdAuthenticate implements AuthMechanism, Serializable
|
|||||||
env.put(Context.SECURITY_PRINCIPAL, m_svcConfig.m_realmsInfo.proxyUsernameCredential(authReqMsg.getRealm()));
|
env.put(Context.SECURITY_PRINCIPAL, m_svcConfig.m_realmsInfo.proxyUsernameCredential(authReqMsg.getRealm()));
|
||||||
env.put(Context.SECURITY_CREDENTIALS, m_svcConfig.m_realmsInfo.proxyPasswordCredential(authReqMsg.getRealm()));
|
env.put(Context.SECURITY_CREDENTIALS, m_svcConfig.m_realmsInfo.proxyPasswordCredential(authReqMsg.getRealm()));
|
||||||
}
|
}
|
||||||
|
env.put("java.naming.ldap.derefAliases", "never");
|
||||||
|
|
||||||
int retries = 3;
|
int retries = 3;
|
||||||
while (retries != 0)
|
while (retries != 0)
|
||||||
@ -237,9 +238,9 @@ public final class PwdAuthenticate implements AuthMechanism, Serializable
|
|||||||
if (realmType != null)
|
if (realmType != null)
|
||||||
{
|
{
|
||||||
if (realmType.equalsIgnoreCase(RealmsInfo.eDirectoryRealm))
|
if (realmType.equalsIgnoreCase(RealmsInfo.eDirectoryRealm))
|
||||||
searchString = "(cn={0})";
|
searchString = "(&(cn={0})(!(objectClass=aliasObject)))";
|
||||||
else if (realmType.equalsIgnoreCase(RealmsInfo.ActiveDirectoryRealm))
|
else if (realmType.equalsIgnoreCase(RealmsInfo.ActiveDirectoryRealm))
|
||||||
searchString = "(sAMAccountName={0})";
|
searchString = "(&(sAMAccountName={0})(!(objectClass=aliasObject)))";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.warn("invoke()- Unsupported realm type " + realmType);
|
m_log.warn("invoke()- Unsupported realm type " + realmType);
|
||||||
|
Loading…
Reference in New Issue
Block a user