How to integrate multiple domains LDAP into xwiki

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to integrate multiple domains LDAP into xwiki

BillyLin
This post has NOT been accepted by the mailing list yet.
HI,

I already integrate one of my domain LDAP into xwiki.
However, I have no idea how to integrate multiple domains LDAP into xwiki.

Here is my xwiki.cfg about LDAP script.


xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1

xwiki.authentication.ldap.server=ADServer
xwiki.authentication.ldap.port=389
xwiki.authentication.ldap.bind_DN=domain1\\{0}
xwiki.authentication.ldap.bind_pass={1}
xwiki.authentication.ldap.base_DN=dc=domain1,dc=com
xwiki.authentication.ldap.UID_attr=sAMAccountName
xwiki.authentication.ldap.trylocal=1
xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn



Is it possible that I could modify login page to add a dropdown like this picture?



Then, I could get the domain parameter from login page and  then modify the script like this:

xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1

xwiki.authentication.ldap.server=domain1=ADServer|domain2=ADServer2
xwiki.authentication.ldap.port=domain1=389|domain2=388
xwiki.authentication.ldap.bind_DN=domain1=domain1\\{0}|domain2=domain2\\{0}
xwiki.authentication.ldap.bind_pass=domain1={1}|domain2={1}
xwiki.authentication.ldap.base_DN=domain1=dc=domain1,dc=com|domain2=dc=domain2,dc=com
xwiki.authentication.ldap.UID_attr=domain1=sAMAccountName|domain2=sAMAccountName
xwiki.authentication.ldap.trylocal=doamin1=1|domain2=1
xwiki.authentication.ldap.fields_mapping=domain1=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn|domain2=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn

Could you give me some suggestions if I cannot do above actions?

Thanks a lot...
Billy