CasExternalConfiguration.md test
###Introduction
Hack to allow cas configuration to be loaded via a .properties
file.
###Details
There is a new version of the ALA CAS Client that allows configuration to be externalised in a .properties
file. CAS will look for the properties file to be supplied as JNDI environment variable.
To use this:
<dependency>
<groupId>au.org.ala</groupId>
<artifactId>ala-cas-client</artifactId>
<version>2.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Set up the default JNDI entry for the prepertiesFile -->
<env-entry>
<env-entry-name>configPropFile</env-entry-name>
<env-entry-value>/data/hubs/config/hubs-config.properties</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
serverName=http://ozcam.ala.org.au
casServerName=https://auth.ala.org.au
uriFilterPattern=/occurrence/.*,/admin,/admin/edit*,/admin/upload,/admin/multiUpload,/admin/multiUpload/.*,/admin/optimise,/admin/reloadAllRanks,/admin/loadCaab,/admin/reloadCollections,/admin/reloadInstitutions,/admin/reloadDataProviders,/admin/reloadDataResources
uriExclusionFilterPattern=/occurrences/shapeUpload,/images.*,/css.*,/js.*,.*json,/help/.*
authenticateOnlyIfLoggedInFilterPattern=/occurrences/.*,/explore/your-area,/query,/proxy/download/.*,/
casServerLoginUrl=https://auth.ala.org.au/cas/login
gateway=true
casServerUrlPrefix=https://auth.ala.org.au/cas
###Trouble shooting
.properies
file:casProperties=casServerLoginUrl,serverName,centralServer,casServerName,uriFilterPattern,uriExclusionFilter,authenticateOnlyIfLoggedInFilterPattern,casServerLoginUrlPrefix,gateway,casServerUrlPrefix,contextPath
####If you wish to turn off CAS add this to .properties
file:
disableCAS=true