Auth via jbdc.Driver (maysql/mariadb) and configuration with SALT.

31 views
Skip to first unread message

artur mis

unread,
May 25, 2022, 3:42:38 AM5/25/22
to CAS Community
I can not auth user with config when i'm using salt:



cas.authn.jdbc.query[0].user=cas_app
cas.authn.jdbc.query[0].password=xxxxxxx
cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.query[0].url=jdbc:mysql://xxxxx:3306/cas_db?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=SHA-256
cas.authn.jdbc.query[0].passwordEncoder.secret=
cas.authn.jdbc.query[0].passwordEncoder.strength=16
cas.authn.jdbc.query[0].sql=SELECT * FROM grants WHERE validTo >= CURDATE() and mail=?
cas.authn.jdbc.query[0].field-password=password
cas.authn.jdbc.query[0].name=local_DB
cas.authn.jdbc.query[0].principalAttributeList=mail,memberOf
cas.authn.jdbc.encode[0].salt-field-name=mail  < - for test inly such salt

I'm windering is correct such conf  especialy about :
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=SHA-256

It seems that in doc they are talking about SSHA  to put in  cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm

DB:
Hash had been  generated in this way:
select SHA2(CONCAT('mail-as-salt-test','passuser'),256);
and than  was inserted to password column.

structure db
cas_db:table grants  has columns mail,password,memberOf.For testing puproses im using mail as salt.

--
BR
Reply all
Reply to author
Forward
0 new messages