java - CAS Authentication using MYSQL database. 'principal' cannot be null -
as part of learning jasig cas trying change authentication database. not working expected. authentication failed following log
2015-06-26 20:19:09 debug jdbctemplate:247 - executing prepared sql query
2015-06-26 20:19:09 debug jdbctemplate:247 - executing prepared sql statement [select password users username=? , active=1]
2015-06-26 20:19:09 debug datasourceutils:247 - fetching jdbc connection datasource
2015-06-26 20:19:09 debug basicresourcepool:1644 - trace com.mchange.v2.resourcepool.basicresourcepool@41e38895 [managed: 6, unused: 5, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.newpooledconnection@27f37294)
2015-06-26 20:19:09 debug datasourceutils:247 - returning jdbc connection datasource
2015-06-26 20:19:09 debug basicresourcepool:1644 - trace com.mchange.v2.resourcepool.basicresourcepool@41e38895 [managed: 6, unused: 5, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.newpooledconnection@27f37294)
2015-06-26 20:19:09 debug ticketorcredentialprincipalresolver:202 - resolving argument [usernamepasswordcredential] audit
2015-06-26 20:19:09 info slf4jloggingaudittrailmanager:306 - audit trail record begin
who: admin+password
what: 'principal' cannot null.
check correctness of @audit annotation @ following audit point: execution(public abstract transient org.jasig.cas.authentication.authentication
org.jasig.cas.authentication.authenticationmanager.authenticate(org.jasig.cas.authentication.credential[]))
action: ticket_granting_ticket_not_created
application: cas
when: fri jun 26 15:24:13 ist 2015
client ip address: 127.0.0.1
server ip address: 127.0.0.1
deployerconfigcontext.xml has following information
<bean id="authenticationmanager" class="org.jasig.cas.authentication.policybasedauthenticationmanager"> <constructor-arg> <list> <ref bean="dbauthhandler" /> </list> </constructor-arg> <property name="authenticationpolicy"> <bean class="org.jasig.cas.authentication.anyauthenticationpolicy" /> </property> </bean> <bean id="datasource" class="com.mchange.v2.c3p0.combopooleddatasource" p:driverclass="${database.driverclass}" p:jdbcurl="${database.url}" p:user="${database.user}" p:password="${database.password}" p:initialpoolsize="${database.pool.minsize}" p:minpoolsize="${database.pool.minsize}" p:maxpoolsize="${database.pool.maxsize}" p:maxidletimeexcessconnections="${database.pool.maxidletime}" p:checkouttimeout="${database.pool.maxwait}" p:acquireincrement="${database.pool.acquireincrement}" p:acquireretryattempts="${database.pool.acquireretryattempts}" p:acquireretrydelay="${database.pool.acquireretrydelay}" p:idleconnectiontestperiod="${database.pool.idleconnectiontestperiod}" p:preferredtestquery="${database.pool.connectionhealthquery}" /> <bean id="passwordencoder" class="org.jasig.cas.authentication.handler.defaultpasswordencoder" c:encodingalgorithm="md5" p:characterencoding="utf-8" /> <bean id="dbauthhandler" class="org.jasig.cas.adaptors.jdbc.querydatabaseauthenticationhandler" p:datasource-ref="datasource" p:passwordencoder-ref="passwordencoder" p:sql="select password users username=? , active=1" />
the credentials validated [ie. no "invalid credentials" message]
Comments
Post a Comment