Authentication issue migrating from 4.x to 5.x using JDBC search mode

70 views
Skip to first unread message

Mathijs Giesbers

unread,
Nov 11, 2016, 3:51:08 AM11/11/16
to CAS Community
Guys,

I'm running into some issues migrating from version 4x to version 5.x. In the previous setup we've used the Database Search mode for authentication (see config below). I'm now trying to use the existing database for authenticating in CAS 5.x but cannot authenticate with my previous credentials. 

Can someone help me sorting out the config below?

Configuration 4.x:
<bean id="primaryAuthenticationHandler" class="org.jasig.cas.adaptors.jdbc.SearchModeSearchDatabaseAuthenticationHandler">
<property name="dataSource" ref="dataSource"></property>
<property name="passwordEncoder">
<bean class="org.jasig.cas.authentication.handler.DefaultPasswordEncoder">
<constructor-arg value="SHA-256" />
</bean>
</property>
<property name="tableUsers" value="users"></property>
<property name="fieldUser" value="username"></property>
<property name="fieldPassword" value="password"></property>
</bean>

<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://127.0.0.1/cas"/>
<property name="username" value="db_username"/>
<property name="password" value="db_password"/>
<property name="validationQuery" value="select 1"></property>
</bean>


Configuration 5.x

cas.authn.accept.users=

cas.authn.jdbc.search[0].fieldUser=username
cas.authn.jdbc.search[0].tableUsers=users
cas.authn.jdbc.search[0].fieldPassword=password
cas.authn.jdbc.search[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.search[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.search[0].passwordEncoder.encodingAlgorithm=SHA-256
# cas.authn.jdbc.search[0].passwordEncoder.secret=
# cas.authn.jdbc.search[0].passwordEncoder.strength=16

cas.authn.jdbc.search[0].healthQuery=SELECT 1
cas.authn.jdbc.search[0].url=jdbc:mysql://127.0.0.1/cas
cas.authn.jdbc.search[0].user=db_username
cas.authn.jdbc.search[0].password=db_password
cas.authn.jdbc.search[0].driverClass=com.mysql.jdbc.Driver


Reply all
Reply to author
Forward
0 new messages