Hello All,
Is there a way to disable chasing LDAP referrals in PostgreSQL?
Take the following LDAP config options from pg_hba.conf
ldapbinddn="cn=bindUser,cn=users,dc=core,dc=dir,dc=org,dc=com"
ldapbindpasswd="bindPass" ldapbasedn="dc=core,dc=dir,dc=org,dc=com"
ldapsearchattribute="sAMAccountName"
From ldapsearch I can do the following search:
-D "cn=bindUser,cn=users,dc=core,dc=dir,dc=org,dc=com" -W \
-b "dc=core,dc=dir,dc=org,dc=com" \
"sAMAccountName=searchUser" sAMAccountName
Which gives me the following response:
# extended LDIF
#
# LDAPv3
# base <dc=core,dc=dir,dc=org,dc=com> with scope subtree
# filter: sAMAccountName=searchUser
# requesting: sAMAccountName
#
dn: CN=searchUser,OU=People,OU=eProfile,DC=core,DC=dir,DC=org,DC=com
sAMAccountName: searchUser
# search reference
=com
# search result
search: 2
result: 0 Success
# numResponses: 3
# numEntries: 1
# numReferences: 1
Which is expected.
If I run psql like so:
psql -U d248265 -h 127.0.0.1 dccn
then it hangs. From a packet capture I've determined that in this time it is trying to resolve the referral, which is broken and times out.
I can verify this by re-running the above ldapsearch with the -C option (automatically chase referrals). This hangs as well.
I know that the real root cause if my broken LDAP server, but is there a way to disable chasing referrals?
Cheers,
James Sewell
James Sewell
PostgreSQL Team Lead / Solutions Architect
_____________________________________