I'm new to CAS and have only been working in it for a few weeks. Has anyone
managed to get the change and forgotten password features to work with JDBC
and MySQL? Eventually we will have our users stored in a MySQL database
but right now I have a single test user and am able to authenticate but
unable to change the user's password with the change password feature. The
CAS page indicates that the password was successfully changed but it isn't.
We're running CAS 5.2.1 in Tomcat 8 and MySQL 5.7.x on Ubuntu 16.04. I
could not get com.mysql.cj.jdbc.Driver to work so I ended up falling back
to com.mysql.jdbc.Driver.
I'm not sure why it isn't working, the CAS documentation has not been
helpful at all. Don't get me wrong I think CAS is great but better
documentation and examples would be extremely helpful to those of us who do
not already know CAS inside and out.
Below is an excerpt from my cas.properties file.
cas.authn.accept.users=
cas.authn.jdbc.query[0].sql=SELECT * FROM USERS WHERE uid=?
cas.authn.jdbc.query[0].url=jdbc:mysql://127.0.0.1:3306/cas
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQL57InnoDBDialect
cas.authn.jdbc.query[0].user=xxxx
cas.authn.jdbc.query[0].password=xxxx
###cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver
cas.authn.jdbc.query[0].fieldPassword=psw
cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5
#cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=SHA-256
#cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.attributeRepository.jdbc[0].singleRow=false
cas.authn.attributeRepository.jdbc[0].sql=SELECT * FROM USERATTRS WHERE {0}
cas.authn.attributeRepository.jdbc[0].username=uid
cas.authn.attributeRepository.jdbc[0].url=jdbc:mysql://127.0.0.1:3306/cas
cas.authn.attributeRepository.jdbc[0].dialect=org.hibernate.dialect.MySQL57InnoDBDialect
cas.authn.attributeRepository.jdbc[0].user=xxxx
cas.authn.attributeRepository.jdbc[0].password=xxxx
###cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.attributeRepository.jdbc[0].driverClass=com.mysql.jdbc.Driver
cas.authn.attributeRepository.jdbc[0].columnMappings.attrname=attrvalue
cas.authn.attributeRepository.attributes.displayName=displayName
cas.authn.attributeRepository.attributes.givenName=givenName
cas.authn.attributeRepository.attributes.mail=email
cas.authn.attributeRepository.defaultAttributesToRelease=displayName,givenName,email
cas.authn.pm.enabled=true
#cas.authn.pm.jdbc[0].sqlSecurityQuestions=SELECT question, answer FROM
USERPM WHERE uid=?
cas.authn.pm.jdbc.sqlFindEmail=SELECT * FROM USERATTRS WHERE uid=? and
attrname='email'
cas.authn.pm.jdbc.sqlChangePassword=UPDATE USERS SET psw=? WHERE uid=?
cas.authn.pm.jdbc.url=jdbc:mysql://127.0.0.1:3306/cas
cas.authn.pm.jdbc.dialect=org.hibernate.dialect.MySQL57InnoDBDialect
cas.authn.pm.jdbc.user=xxxx
cas.authn.pm.jdbc.password=xxxx
###cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.pm.jdbc.driverClass=com.mysql.jdbc.Driver
cas.authn.pm.jdbc.fieldPassword=psw
cas.authn.pm.jdbc.passwordEncoder.type=DEFAULT
cas.authn.pm.jdbc.passwordEncoder.encodingAlgorithm=MD5
Thank you in advance to any of you who might be able to point me in the
right direction.
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/1fab61e5-79f3-4111-8368-a4ed0de0ba36%40apereo.org.