How to setup CAS password encoder to read passwords created using python's pbkdf2_sha512 that uses random generated salt?

67 views Asked by At

I have a user table with username(email) and password created using the python's passlib pbkdf2_sha512 of the form similar to : $pbkdf2-sha512$25000$c2FsdA$byMmSVtzoKnEtocp3n7BBt5t6qRWsbVSqyE3YaMlbJIXZW3UMEN6F3mFPFqAn90LVvTlk.I3WujNGxvgi3Rj4A where first segment pbkdf2-sha512 is the algorithm & encoding, second segment after $ , 25000 is the no of rounds , third segment after $ is the encoded salt value and the 4th segment is the generated hash as per my understanding.

How can I configure CAS to read this database. With plain text password I am able to authenticate against this database table, however I am unable to configure cas for this encryption created through python. Any other pointers about how to approach this problem without changing user passwords will also be very helpful.

I tried setting the properties: cas.authn.jdbc.query[0].password-encoder.type=PBKDF2 cas.authn.jdbc.query[0].password-encoder.encoding-algorithm=PBKDF2WithHmacSHA512

However, the no of iterations cannot be specified using CAS DB Query method. I do not find any examples in the documentation to configure the same. Any links to the sample configurations will be appreciated as well.

0

There are 0 answers