+

Add LDAP manager bind DN and password

Benjamin Renard [2014-12-29 17:49:04]
Add LDAP manager bind DN and password
Filename
config.properties
custom/webpages/WEB-INF/auth-configuration/ldap-auth.xml
custom/webpages/WEB-INF/cas.properties
diff --git a/config.properties b/config.properties
index 8e493c9..99567c6 100644
--- a/config.properties
+++ b/config.properties
@@ -1,7 +1,9 @@
 # Ldap properties
-ldap.host.1=ldap://ldap1.fr:389
-ldap.host.2=ldap://ldap2.fr:389
-ldap.basedn=uid=%u,ou=people,dc=univ,dc=fr
+ldap.basedn=ou=people,ou=people,dc=univ,dc=fr
+ldap.host.1=ldap://ldap1.univ.fr:389
+ldap.host.1=ldap://ldap2.univ.fr:389
+ldap.manager.dn=uid=cas,ou=sysaccounts,dc=univ,dc=fr
+ldap.manager.password=secret

 # file authenticate layer
 passfile.encode-algo=MD5
diff --git a/custom/webpages/WEB-INF/auth-configuration/ldap-auth.xml b/custom/webpages/WEB-INF/auth-configuration/ldap-auth.xml
index cc58f71..e92a513 100644
--- a/custom/webpages/WEB-INF/auth-configuration/ldap-auth.xml
+++ b/custom/webpages/WEB-INF/auth-configuration/ldap-auth.xml
@@ -30,6 +30,8 @@
 				<value>${ldap.host.2}</value>
 			</list>
 		</property>
+		<property name="userDn" value="${ldap.manager.dn}"/>
+		<property name="password" value="${ldap.manager.password}"/>
 		<property name="baseEnvironmentProperties">
 			<map>
 				<!--
diff --git a/custom/webpages/WEB-INF/cas.properties b/custom/webpages/WEB-INF/cas.properties
index bb8381f..37bbbdf 100644
--- a/custom/webpages/WEB-INF/cas.properties
+++ b/custom/webpages/WEB-INF/cas.properties
@@ -26,6 +26,8 @@ cas.authHandlers=@cas.authHandlers@
 ldap.host.1=@ldap.host.1@
 ldap.host.2=@ldap.host.2@
 ldap.basedn=@ldap.basedn@
+ldap.manager.dn=@ldap.manager.dn@
+ldap.manager.password=@ldap.manager.password@

 #FILE auth configuration
 passfile.encode-algo=@passfile.encode-algo@
ViewGit