CAS 5.1.1 MariaDB Authentication

331 views
Skip to first unread message

Nic Lang

unread,
Jul 3, 2017, 9:08:40 AM7/3/17
to CAS Community
Hi i try to make CAS 5.1.1 authenticate with a mariadb database

First wich support dependency do i need to add to pom.xml,
cas-server-support-jdbc or cas-server-support-jdbc-drivers ? 
i tried both.. fail and one by one it fail too


i seems to me that CAS does not know how  to authenticate this is my conf :

cas.authn.accept.users=
cas.authn.jdbc.query[0].sql=SELECT pwd FROM users WHERE email1=?
cas.authn.jdbc.query[0].url=jdbc:mysql://127.0.0.1:3306/mydb
cas.authn.jdbc.query[0].driverClass=org.mariadb.jdbc.Driver
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MariaDBDialect
cas.authn.jdbc.query[0].fieldPassword=pwd
cas.authn.jdbc.query[0].tableUsers=users

cas.authn.jdbc.query[0].user=myuser
cas.authn.jdbc.query[0].password=mypassword
cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=SHA1


DEBUG Log :
2017-07-03 14:53:27,538 DEBUG [org.apereo.cas.authentication.RegisteredServiceAuthenticationHandlerResolver] - <Authentication handlers used for this transaction are [HttpBasedServiceCredentialsAuthenticationHandler]>
2017-07-03 14:53:27,541 WARN [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <Authentication has failed. Credentials may be incorrect or CAS cannot find authentication handler that supports [dfsqdf] of type [UsernamePasswordCredential], which suggests a configuration problem.>
2017-07-03 14:53:27,559 ERROR [org.apereo.cas.web.flow.AuthenticationExceptionHandlerAction] - <Unable to translate handler errors of the authentication exception [org.apereo.cas.authentication.AuthenticationException: 0 errors, 0 successes]Returning [UNKNOWN]>


I already use CAS 5.1 with ldap auth and it work, i pretty sure i miss something for database auth  but do know what

Thanks,

Nicolas

Nic Lang

unread,
Jul 5, 2017, 2:50:43 AM7/5/17
to CAS Community
Hi, i 'm still trying to find an issue, when i just add to pom.xml
cas-server-support-jdbc-drivers 
i get this error in log
Caused by: java.lang.RuntimeException: Failed to load class of driverClassName com.mysql.jdbc.Driver

it looks like CAS didn't find this dependency but all the jar are present in loaded lib
any help would be great

Thanks

nicolas

Sai Suman Mallela

unread,
Jul 5, 2017, 10:02:59 AM7/5/17
to cas-...@apereo.org
Use 5.0.6  as the version for that dependency as a temporary fix.

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/c2416965-59f6-4b59-85a9-6f5e39974b1c%40apereo.org.

Nic Lang

unread,
Jul 9, 2017, 4:26:49 PM7/9/17
to CAS Community
thank you, it solve the problem, do you have an idea why this bug is present in all more recent versions ?
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
Reply all
Reply to author
Forward
0 new messages