Cas 5.3.6 configuration for custom passwordEncoder with DB(postgresql) access

22 views
Skip to first unread message

sato

unread,
Jan 30, 2019, 9:11:50 PM1/30/19
to CAS Community
Hi, I am trying to use cas 5.3.6. If I set simple text in password column, login with the password is working.
But currently I have custom encoded password in the password column.
So I added custom password encoder class, then it stops working(meaning it rejects user as password was wrong). I set syslog in the password encoder class. The class is called whenever user login. Seems something wrong with my application.prop setting. Would anyone see what is wrong with my setting?
I really appreciate your help!

[application.properties]

##
# CAS Authentication Credentials
#
cas.authn.accept.users=
cas.authn.accept.passwordEncoder.type=com.satosato.cas.auth.PasswordEncoder
cas.authn.accept.passwordEncoder.characterEncoding=UTF-8
cas.authn.accept.passwordEncoder.encodingAlgorithm=NONE
cas.authn.accept.passwordEncoder.secret=
#cas.authn.accept.passwordEncoder.strength=16

cas.authn.jdbc.query[0].passwordEncoder.type=com.satosato.cas.auth.PasswordEncoder
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=NONE
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.query[0].passwordEncoder.secret=
#cas.authn.jdbc.query[0].passwordEncoder.strength=16


# cas.authn.reject.users=user1,user2
# cas.authn.reject.name=


cas.authn.jdbc.query[0].url=jdbc:postgresql://host/test_db?characterEncoding=UTF-8&charSet=UTF-8&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.PostgreSQL95Dialect
cas.authn.jdbc.query[0].user=testuser
cas.authn.jdbc.query[0].password=testpassword
cas.authn.jdbc.query[0].driverClass=org.postgresql.Driver
cas.authn.jdbc.query[0].healthQuery=select 1 from user

cas.authn.jdbc.query[0].pool.suspension=false
cas.authn.jdbc.query[0].pool.minSize=6
cas.authn.jdbc.query[0].pool.maxSize=18
cas.authn.jdbc.query[0].pool.maxWait=2000
cas.authn.jdbc.query[0].pool.timeoutMillis=1000


cas.authn.jdbc.query[0].sql=select * from user where lower(username) = lower(?)
cas.authn.jdbc.query[0].fieldPassword=password


cas.authn.jdbc.query[0].fieldExpired=
cas.authn.jdbc.query[0].fieldDisabled=
cas.authn.jdbc.query[0].principalAttributeList=sn,cn:commonName,givenName
Reply all
Reply to author
Forward
0 new messages