| ContextLoaderListener declared in web.xml. It finds this file
because this
| file is among those declared in the context parameter
"contextConfigLocation".
|
| By far the most common change you will need to make in this file is
to change the last bean
| declaration to replace the default
SimpleTestUsernamePasswordAuthenticationHandler with
| one implementing your approach for authenticating usernames and
passwords.
+-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-bean
s-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd h
ttp://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<!-- Config property for uofu opensso support -->
<!-- the context listener load system properties from app.properties
and the propertyConfigurer defaults to reading system properties
That is how we get ldap config ueing El language below -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<!-- <property name="systemPropertiesModeName"
value="SYSTEM_PROPERTIES_MODE_FALLBACK"/> -->
<!-- <property name="order">
<value>0</value>
</property> -->
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name="location">
<value>file:/vend/glassfishv3/glassfish/domains/cas/config/uofu_cas.properties</value>
</property>
</bean>
<bean id="properties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>file:/vend/glassfishv3/glassfish/domains/cas/config/uofu_cas.properties</value>
</list>
</property>
</bean>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".jsp"/>
<property name="exposedContextBeanNames">
<list>
<value>properties</value>
</list>
</property>
</bean>
<bean id="contextSource"
class="org.springframework.ldap.core.support.LdapContextSource">
<property name="pooled" value="true"/>
<property name="urls">
<list>
<!--
<value>ldap://wanship.acs.utah.edu:9100/</value>
-->
<!-- DEV
<value>ldap://ldap2.acs.utah.edu:9192/</value>
-->
<!-- Hellhole
<value>ldap://hellhole.acs.utah.edu:9600/</value>
-->
<!-- Active directory on Ring -->
<!--<value>ldaps://ring.ad.utah.edu</value>-->
<!-- <value>${cas.ldap.server.1}</value> -->
<!-- Persistent LDAP for PROD -->
<!-- <value>ldap://ldap3.acs.utah.edu:9200 SCOUT/</value> -->
<value>${casldapserver1}</value>
<!-- Persistent LDAP for DEV WANSHIP
<value>ldap://ldap2.acs.utah.edu:9182/</value>
-->
</list>
</property>
<!-- hellhole
<property name="userDn" value="uid=psauth,ou=System
Accounts,o=utah.edu"/>
<property name="password" value="f1r3mya5"/>
-->
<!-- Ring -->
<!-- <property name="userName"
value="CN=CASAuth,OU=Administration,DC=ad,DC=utah,DC=edu"/> -->
<!--USE El as above to get these values from app.properties-->
<!--<property name="userDn"
value="CN=CASAuth,OU=Services,OU=Administration,DC=ad,DC=utah,DC=edu"/>
<property name="password" value="Ka3!R39y"/>-->
<property name="userDn">
<value>${cas.ldap.userDN}</value>
<!-- <value>uid=psauth,ou=System Accounts,o=utah.edu</value>-->
</property>
<!-- <property name="password" value="f1r3mya5"/> -->
<property name="password" value="${cas.ldap.user.password}"/>
<property name="baseEnvironmentProperties">
<map>
<entry>
<key>
<value>java.naming.security.authentication</value>
</key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
<!--
| This bean declares our AuthenticationManager. The
CentralAuthenticationService service bean
| declared in applicationContext.xml picks up this
AuthenticationManager by reference to its id,
| "authenticationManager". Most deployers will be able to use
the default AuthenticationManager
| implementation and so do not need to change the class of this
bean. We include the whole
| AuthenticationManager here in the userConfigContext.xml so
that you can see the things you will
| need to change in context.
+-->
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManagerImpl">
<!--
| This is the List of CredentialToPrincipalResolvers
that identify what Principal is trying to authent
icate.
| The AuthenticationManagerImpl considers them in
order, finding a CredentialToPrincipalResolver which
| supports the presented credentials.
|
| AuthenticationManagerImpl uses these resolvers for
two purposes. First, it uses them to identify th
e Principal
| attempting to authenticate to CAS /login . In the
default configuration, it is the DefaultCredentia
lsToPrincipalResolver
| that fills this role. If you are using some other
kind of credentials than UsernamePasswordCredenti
als, you will need to replace
| DefaultCredentialsToPrincipalResolver with a
CredentialsToPrincipalResolver that supports the creden
tials you are
| using.
|
| Second, AuthenticationManagerImpl uses these
resolvers to identify a service requesting a proxy gran
ting ticket.
| In the default configuration, it is the
HttpBasedServiceCredentialsToPrincipalResolver that serves t
his purpose.
| You will need to change this list if you are
identifying services by something more or other than th
eir callback URL.
+-->
<property name="credentialsToPrincipalResolvers">
<list>
<!-- try the x509 stuff
<bean
class="org.jasig.cas.adaptors.x509.authentication.principal.X509CertificateCredentialsToIdentifierPrincipalResolver">
<property name="identifier" value="$OU $CN" />
</bean>
-->
<!--
| Access Manager token to Unid
principle resolver
-->
<!--<bean
class="org.jasig.cas.adaptors.accessManager.authentication.principal.AccessManagerCred
entialsToIdentifierPrincipalResolver" />
-->
<!--
|
UsernamePasswordCredentialsToPrincipalResolver supports the
UsernamePasswordCredenti
als that we use for /login
| by default and produces
SimplePrincipal instances conveying the username from the cr
edentials.
|
| If you've changed your
LoginFormAction to use credentials other than UsernamePasswor
dCredentials then you will also
| need to change this bean declaration
(or add additional declarations) to declare a C
redentialsToPrincipalResolver that supports the
| Credentials you are using.
+-->
<bean
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalRe
solver" />
<!--
|
HttpBasedServiceCredentialsToPrincipalResolver supports HttpBasedCredentials.
It su
pports the CAS 2.0 approach of
| authenticating services by SSL
callback, extracting the callback URL from the Creden
tials and representing it as a
| SimpleService identified by that
callback URL.
|
| If you are representing services by
something more or other than an HTTPS URL wherea
t they are able to
| receive a proxy callback, you will
need to change this bean declaration (or add addi
tional declarations).
<bean
class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalRe
solver" />
</list>
</property>
<!--
| Whereas CredentialsToPrincipalResolvers identify who
it is some Credentials might authenticate,
| AuthenticationHandlers actually authenticate
credentials. Here we declare the AuthenticationHandler
s that
| authenticate the Principals that the
CredentialsToPrincipalResolvers identified. CAS will try these
handlers in turn
| until it finds one that both supports the Credentials
presented and succeeds in authenticating.
+-->
<property name="authenticationHandlers">
<list>
<!--
| This is the authentication handler
that authenticates services by means of callback
via SSL, thereby validating
| a server side SSL certificate.
+-->
<bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient" />
<!--
| This is the authentication handler
declaration that every CAS deployer will need to
change before deploying CAS
| into production. The default
SimpleTestUsernamePasswordAuthenticationHandler authen
ticates UsernamePasswordCredentials
| where the username equals the
password. You will need to replace this with an Authe
nticationHandler that implements your
| local authentication strategy. You
might accomplish this by coding a new such handl
er and declaring
|
edu.someschool.its.cas.MySpecialHandler here, or you might use one of the
handlers p
rovided in the adaptors modules.
+-->
<!-- FAST BIND DONT WORK WITH UNID!! on hellhole
<bean class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler">
<property name="filter" value="unid=%u,ou=people,o=utah.edu" />
<property name="filter" value="${uofu.cas.ldap.bind}" />
<property name="contextSource" ref="contextSource" />
</bean>
-->
<!-- Use this with A/D on Ring -->
<!-- This was included by Bryant as a way to use the handler.
<bean
class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" > -->
<!-- <property name="filter"
value="cn=%u,OU=people,dc=ad,dc=utah,dc=edu" /> -->
<!--
<property name="filter" value="${uofu.cas.ldap.bind}" />
<property name="contextSource" ref="contextSource" />
</bean>
-->
<!-- Hellhole persitent ldap bind -->
<bean
class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
<property name="filter" value="unid=%u" />
<property name="searchBase" value="ou=people,o=utah.edu"/>
<property name="contextSource" ref="contextSource" />
</bean>
<!-- Bean for Access Manager authenttication
-->
<!-- <bean
class="org.jasig.cas.adaptors.accessManager.authentication.handler.support.AccessManagerCredentialsA
uthenticationHandler">
</bean>-->
</list>
</property>
</bean>
<!--
This bean defines the security roles for the Services Management
application. Simple deployments can use the in-memor
y version.
More robust deployments will want to use another option, such as the
Jdbc version.
The name of this should remain "userDetailsService" in order for Acegi to find
it.
To use this, you should add an entry similar to the following between
the two value tags:
battags=notused,ROLE_ADMIN
where battags is the username you want to grant access to. You can put
one entry per line.
-->
<sec:user-service id="userDetailsService">
<sec:user name="u0519980" password="notused" authorities="ROLE_ADMIN" />
</sec:user-service>
<!--
Bean that defines the attributes that a service may return. This
example uses the Stub/Mock version. A real implemen
tation
may go against a database or LDAP server. The id should remain
"attributeRepository" though.
-->
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.StubPersonAttributeDao">
<property name="backingMap">
<map>
<entry key="uid" value="uid" />
<entry key="eduPersonAffiliation" value="eduPersonAffiliation"
/>
<entry key="groupMembership" value="groupMembership" />
</map>
</property>
</bean>
<!--
Sample, in-memory data store for the ServiceRegistry. A real
implementation
would probably want to replace this with the JPA-backed ServiceRegistry
DAO
The name of this bean should remain "serviceRegistryDao".
-->
<!--
<bean
id="serviceRegistryDao"
class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
<property name="registeredServices">
<list>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="0" />
<property name="name" value="HTTP" />
<property name="description" value="Only Allows HTTP
Urls" />
<property name="serviceId" value="http://**" />
</bean>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="1" />
<property name="name" value="HTTPS" />
<property name="description" value="Only Allows HTTPS
Urls" />
<property name="serviceId" value="https://**" />
</bean>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="2" />
<property name="name" value="IMAPS" />
<property name="description" value="Only Allows HTTPS
Urls" />
<property name="serviceId" value="imaps://**" />
</bean>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="3" />
<property name="name" value="IMAP" />
<property name="description" value="Only Allows IMAP
Urls" />
<property name="serviceId" value="imap://**" />
</bean>
</list>
</property>
</bean>
-->
<bean id="serviceRegistryDao"
class="org.jasig.cas.services.JpaServiceRegistryDaoImpl"
p:entityManagerFactory-ref="entityManagerFactory"
</bean>
<!-- This is the EntityManagerFactory configuration for Hibernate -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="true"/>
<property name="showSql" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop
key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<!--
<bean
id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
p:driverClassName="oracle.jdbc.driver.OracleDriver"
p:url="${cas.database.url}"
p:username="${cas.database.user}"
p:password="${cas.database.password}"
p:defaultAutoCommit="true"
p:defaultTransactionIsolation="2"
p:url=""jdbc:oracle:thin:@castle.acs.utah.edu:2083:oems
p:username="usecuredev"
p:password="usecuredev"
p:defaultAutoCommit="true"
p:defaultTransactionIsolation="2"
/>
-->
<bean
id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
p:driverClassName="oracle.jdbc.driver.OracleDriver"
p:url="${cas.database.url}"
p:username="${cas.database.user}"
p:password="${cas.database.password}"
p:defaultAutoCommit="true"
p:defaultTransactionIsolation="2"
/>
</beans>
________________________________________
From: Marvin Addison [[email protected]]
Sent: Saturday, April 16, 2011 11:45 AM
To: [email protected]
Subject: Re: [cas-user] Help!
> [#|2011-04-16T11:36:40.634-0600|INFO|glassfish3.0.1|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=67;_ThreadName=Thread-2;|2011-04-16
> 11:36:40,634 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] -
> <Extractor generated service for:
> https://gate.acs.utah.edu/psp/plpr/EMPLOYEE/EMPL/h>
CasArgumentExtractor fires on every request to the login webflow, so
the frequency likely correlates directly with your load. I think 512M
is fine for perm space, and besides you get a very distinctive "Out of
perm gen space" error when you run out. Increase that only in
response to that message.
M
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user