CAS DataBase Authentication

The following is what you need to do; to get your CAS server authenticate against Databases instead of default inMemory Authentication:-

  1. Copy the following (ommons-collections-3.2.jar, commons-dbcp-1.2.1.jar,commons-pool-1.3.jar) jars to your cas/web-inf/lib/
  2. Copy your DataBase driver (ojdbc14.jar) to cas/web-inf/lib/
  3. then edit your cas/web-inf/deployerConfigContext.xml to be as follows:
<?xml version="1.0" encoding="UTF-8"?>
  
<!DOCTYPE beans PUBLIC  "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
  
<beans>
  
    <bean id="authenticationManager"
          class="org.jasig.cas.authentication.AuthenticationManagerImpl">
        <property name="credentialsToPrincipalResolvers">
            <list>
                <bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
                <bean class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
            </list>
        </property>

        <property name="authenticationHandlers">
            <list>
                <!--bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" />
                <bean class="org.acegisecurity.adapters.cas3.CasAuthenticationHandler">
                    <property name="authenticationManager" ref="acegiAuthenticationManager" />
                </bean-->

                <bean id="SearchModeSearchDatabaseAuthenticationHandler"
                      class="org.jasig.cas.adaptors.jdbc.SearchModeSearchDatabaseAuthenticationHandler"
                      abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
                    <property name="tableUsers">
                        <!-- USER_TABLE-->
                        <value>SF_INF_USERS</value>
                    </property>
                    <property name="fieldUser">
                        <!-- USERR_NAME Column Name -->
                        <value>NAME</value>
                      </property>
                      <property name="fieldPassword">
                           <!-- PASSWORD Column Name -->
                           <value>PSWD</value>
                      </property>
  
                      <property name="dataSource" ref="dataSource" />
                </bean>
            </list>
        </property>
    </bean>
  
    <!-- the old inMemory Authentication -->
    <!--bean id="inMemoryDaoImpl" class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
        <property name="userMap">
            <value>
                aabdelaziz=aabdelaziz,EPS_SYSTEM_ADMIN
                marissa=koala,ROLES_IGNORED_BY_CAS
                dianne=emu,ROLES_IGNORED_BY_CAS
                scott=wombat,ROLES_IGNORED_BY_CAS
                peter=opal,disabled,ROLES_IGNORED_BY_CAS
            </value>
        </property>
    </bean>
  
    <bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
        <property name="userDetailsService"><ref bean="inMemoryDaoImpl"/></property>
    </bean>

    <bean id="acegiAuthenticationManager" class="org.acegisecurity.providers.ProviderManager">
        <property name="providers">
            <list>
                <ref bean="daoAuthenticationProvider"/>
            </list>
        </property>
    </bean-->
  
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName">
            <value>oracle.jdbc.driver.OracleDriver</value>
        </property>
  
        <property name="url">
            <value>jdbc:oracle:thin:@10.1.119.76:1521:epsdb</value>
        </property>
  
        <property name="username">
            <value>eps</value>
        </property>
  
        <property name="password">
            <value>eps</value>
        </property>
    </bean>
</beans>­


Refrences:

http://www.ja-sig.org/wiki/display/CASUM/Using+JDBC+for+Authentication

This helped me in some way.

This helped me in some way. Thanks for sharing what you know.

check out: buy youtube subscribers

This article is so bad,

This article is so bad, because I have no idea what I am reading right now. - Marla Ahlgrimm

 i dont understand about

 i dont understand about the languange

gamis syari murah

www.everydayhijab.com

I'm now not sure the place

I'm now not sure the place you are getting your information, but good topic. I must spend a while finding out more or understanding more. Thank you for fantastic information I used to be searching for this info for my mission. Gebyar BolaAgen Ibcbet

http://www.avalonseafood.com/

http://www.avalonseafood.com/sitemap.asp be taken into consideration.The appearance of accoutrements should be in band with your personality and taste.There is a array of handbags accessible in the market.The amount and superior alter a lot.You accept to be actual alert if selecting a absolute bag.Here are some tips to acquaint the difference.You can try http://www.riversidebellechasse.com/left.html

Powered by Drupal - Design by artinet