Wednesday, June 13, 2012

Create OpenLDAP chaining

Many times we require alfresco authentication from one or more LDAP system for authentication.
Here we will look at authentication from two openLDAP.

Note : Below configuration is related to alfresco 4.x versions

I am here refering two LDAP as below :
#1) Internal LDAP
#2) ExternalLDAP

Step #1) Copy ldap files from original location and create/paste to extension path.
-----------------------------------------------------------------------------------
Copy following file from path
 (<alfresco>\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap)
1. ldap-authentication.properties
2. ldap-authentication-context.xml

Paste both file(s)  to following location. (<alfresco>\tomcat\shared\classes\alfresco\extension\subsystems\Authentication\ldap\internalLDAP)
(<alfresco>\tomcat\shared\classes\alfresco\extension\subsystems\Authentication\ldap\externalLDAP)

You can see here we need to create two folders 1) internalLDAP  2) externalLDAP to separate out both LDAP.

You can configure internalLDAP connection settings in ldap-authentication.properties inside internalLDAP folder and for externalLDAP to same file ldap-authentication.properites.

Step #2) Add  common-ldap-context.xml
-------------------------------------------
Copy <alfresco>\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\common-ldap-context.xml

Paste to path (<alfresco>\tomcat\shared\classes\alfresco\extension\subsystems\Authentication )

Step #3) Make chaining entry inside alfresco-global.properties
-------------------------------------------------------------------------
 Place below entry


### Ldap settings ####
authentication.chain=externalLDAP:ldap,internalLDAP:ldap,alfrescoNtlm1:alfrescoNtlm

You can place these 3 in any order you want.

alfrescoNtlm is alfresco's default authentication mechanism.

Please make above changes and restart server.







No comments:

Post a Comment