Jan 9

Endian Firewall - LDAP + Proxy Authentication

Category: Nox

Few months back I gave up with my test “proxy authentication via ldap” in Endian Firewall since there was something in Endian which prevent users from authenticate correctly to my ldap servers. However, last week I found something which can help you all configure your Endian HTTP proxy authentication correctly with any ldap server.

efw-ldap-nox.PNG

So basically, I found that the culprit is “LDAP config” inside Endian squid.conf as below :

# START AUTHENTICATION (NOX)
# METHOD is LDAP
auth_param basic program /usr/lib/squid/squid_ldap_auth -b “dc=no-x,dc=org” -d -D “cn=yours,dc=no-x,dc=org” -w “password” -f “(&(&(objectClass=person)(uid=%s))(|))” -u uid -v 3 -P xx.xx.xx.xx:389
auth_param basic children 20
auth_param basic realm LOGIN
auth_param basic credentialsttl 60 minutes

  1. The “(|)” sign (=or) will result your squid cache.log return an error while looking for uid for the user during proxy authentication. No matter how you try it, you will unable to authenticate correctly to your LDAP server.
  2. Manual changes for LDAP authentication in squid.conf will be changed to Endian default squid.conf once you try to reload or restart your squid via Endian Proxy Web Access(GUI).

To overcome this,I try searching user(herry) using any free LDAP tool/browser(LdapSoft) with default Endian filter as below :

ldapsoft-search-filter.PNG

(&(&(objectClass=person)(uid=%s))(|)) and result filter error as below :

ldapsoft-search-result.PNG

Then, I removed the (|) sign and LdapSoft successfully found that user : ldapsoft-search-filter2.PNG ldapsoft-search-result2.PNG
Now, I did manually changed the LDAP authentication line to new one by removing (|) sign as below :

# START AUTHENTICATION (NOX)
# METHOD is LDAP
auth_param basic program /usr/lib/squid/squid_ldap_auth -b “dc=no-x,dc=org” -d -D “cn=yours,dc=no-x,dc=org” -w “password” -f “(&(&(objectClass=person)(uid=%s)))” -u uid -v 3 -P xx.xx.xx.xx:389
auth_param basic children 20
auth_param basic realm LOGIN
auth_param basic credentialsttl 60 minutes

As expected, I finally managed to authenticate to my Endian Proxy server without issue.

efw-ldap-authenticate.png efw-ldap-authenticate2.png

Next, to prevent your squid.conf from change back to Endian default one, don’t restart your proxy via Endian Web Access. Do it via command line instead (/etc/init.d/squid restart)

Notes : I successfully tested above configuration with LDAP server Openldap 2.3.24 & SLES 9 edirectory.
ariyossss

athlon_crazy 10:03pm 09/01/2010

No Comments

Leave a comment