CAS Toolbox is a tool meant :
This package is develop by Esup-portail Consortium
The CAS Toolbox package is available at https://sourcesup.cru.fr/frs/?group_id=401
Subversion : https://subversion.cru.fr/cas-toolbox
cas-toolbox-X-Y | custom | resources | | [...] | update | | source | | | [...] | | webpages | | | [...] | update.esup | build.sample.properties | build.xml | config.sample.properties | README |
CAS Toolbox is designed to handle different configuration and/or customization levels.
In the build.properties file, you can specify a Subversion repository should present an update-XXX folder, used during the initialization step.
svnant.update.url=http://subversion.cru.fr/cas-toolbox/trunk/update.esup/ svnant.repository.user= svnant.repository.passwd= svnant.update.path=${basedir}/update.esup svnant.update.version=HEAD |
You can chain several update folders in the build.properties file:
update.path=${basedir}/update,${basedir}/update.esup |
The order is meaningful: the last update folder always overwrites files from previous updates.
These folders may contain :
deploy.path=/home/cas/webapps/cas config.file=${basedir}/config.properties |
maven.offline=false |
Set this property to false the first time you use the init task, allowing Maven to download dependencies. Set it to true with no Internet access.
update.path=${basedir}/update custom.path=${basedir}/custom |
You can this way customize the update and cutom folders if you don't want to use the default ones.
The config.properties allows to specify your own authentication handlers:
cas.authHandlers=ldapHandler,fileHandler |
Available handlers are listed in the build.properties file : ldapHandler, fileHandler, jdbcHandler, radiusHandler, etc ...
During the initialization step, this property is used to :
Specific properties should set in to config.properties (these properties will be used by the specific configuration files of the handlers):
Example for the LDAP handler:
# # config.properties # ldap.host.1=ldap://ldap1.univ-nancy2.fr:392 ldap.host.2=ldap://ldap2.univ-nancy2.fr:392 ldap.basedn=uid=%u,ou=people,dc=univ-nancy2,dc=fr |
ldap-auth.xml :
<bean id="ldapHandler" class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" lazy-init="true"> <property name="filter" value="${ldap.basedn}" /> <property name="contextSource"> <bean class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource"> <property name="pooled" value="true"/> <property name="anonymousReadOnly" value="true" /> <property name="urls"> <list> <value>${ldap.host.1}</value> <value>${ldap.host.2}</value> </list> </property> </bean> </property> </bean> |
Apart from these specific properties, the file config.properties also contains global properties used by the CAs server itself:
#logs directory log.dir=${catalina.home}/logs #cas host cas.host=jmarchal-dev.univ-nancy2.fr # cas uri (empty if /) cas.uri= # cas port empty (if standard) cas.port= #User allow to use services manager (services/manage.html) security.useradmin=admin # graphic theme theme=default views=default |
Below is an customization example for the LDAP authentication handler (we want here to add LDAP connection timeouts).
<bean id="ldapHandler" class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" lazy-init="true"> <property name="filter" value="${ldap.basedn}" /> <property name="contextSource"> <bean class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource"> <property name="pooled" value="true"/> <property name="anonymousReadOnly" value="true" /> <property name="urls"> <list> <value>${ldap.host.1}</value> <value>${ldap.host.2}</value> </list> </property> <property name="baseEnvironmentProperties"> <map> <entry key="com.sun.jndi.ldap.connect.timeout" value="${ldap.connect.timeout}"/> <entry key="com.sun.jndi.ldap.read.timeout" value="${ldap.read.timeout}"/> </map> </property> </bean> </property> </bean> |
# Ldap timeout ldap.connect.timeout=100 ldap.read.timeout=30 |
Once your installation has been customized, CAS Toolbox offers an easy way of building quickstart distributions:
tomcat.download.url=http://apache.miroir-francais.fr/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat-6.0.14.tar.gz tomcat.version=apache-tomcat-6.0.14 tomcat.port.stop=8005 tomcat.port.http=8080 tomcat.port.redirect=8443 tomcat.port.ajp=8009 |
Esup gives provides an update folder more accurate for French universities.
esup-upadte folder is now include in cas-toolbox.
svnant.update.url=http://subversion.cru.fr/cas-toolbox/tags/[CAS-TOOLBOX_VERSION]/update.XXXX/ svnant.repository.user= svnant.repository.passwd= svnant.update.path=${basedir}/update.XXXX svnant.update.version=HEAD |
update.path=${basedir}/update,${basedir}/update.XXXX |