Unable to authenticate with Encrypted Password

14 views
Skip to first unread message

Navdeep Singh Chander

unread,
Aug 8, 2017, 7:29:30 AM8/8/17
to cas-...@apereo.org
Hello,

We are setting up new CAS 5.1 Server using JDBC authentication.

Initially, to make it work and bring it up and running we used a temporary simple text password. And Used QUERY based configuration. It worked well and my registered service provider is able to authenticate.

Now since finally, we need to authenticate users against the actual encrypted password column. We removed QUERY based configuration and added ENODE based configuration.

However, after doing so, we are always getting an error in the logs as:

2017-08-08 03:06:45,689 WARN [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <Authentication has failed. Credentials may be incorrect or CAS cannot find authentication handler that supports [XXXXXXXXXXX] of type [UsernamePasswordCredential], which suggests a configuration problem.>
Here are the cas.properties that I configured:
#########################################################################
cas.authn.jdbc.encode[0].numberOfIterations=1000
# cas.authn.jdbc.encode[0].numberOfIterationsFieldName=numIterations
cas.authn.jdbc.encode[0].saltFieldName=PasswordSalt
# cas.authn.jdbc.encode[0].staticSalt=
cas.authn.jdbc.encode[0].sql=SELECT * FROM Login L INNER JOIN Contact C ON C.ContactID = L.ContactID WHERE C.Email=?
# cas.authn.jdbc.encode[0].algorithmName=SHA-1
cas.authn.jdbc.encode[0].passwordFieldName=EncryptedPassword
# cas.authn.jdbc.encode[0].expiredFieldName=
cas.authn.jdbc.encode[0].disabledFieldName=IsLocked
# cas.authn.jdbc.encode[0].healthQuery=
# cas.authn.jdbc.encode[0].isolateInternalQueries=false
cas.authn.jdbc.encode[0].url=<MASKED>
# cas.authn.jdbc.encode[0].failFast=true
# cas.authn.jdbc.encode[0].isolationLevelName=ISOLATION_READ_COMMITTED
cas.authn.jdbc.encode[0].dialect=org.hibernate.dialect.SQLServerDialect
# cas.authn.jdbc.encode[0].leakThreshold=10
# cas.authn.jdbc.encode[0].propagationBehaviorName=PROPAGATION_REQUIRED
# cas.authn.jdbc.encode[0].batchSize=1
cas.authn.jdbc.encode[0].user=<Masked>
# cas.authn.jdbc.encode[0].ddlAuto=create-drop
# cas.authn.jdbc.encode[0].maxAgeDays=180
cas.authn.jdbc.encode[0].password=<Masked>
# cas.authn.jdbc.encode[0].autocommit=false
cas.authn.jdbc.encode[0].driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
cas.authn.jdbc.encode[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.encode[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.encode[0].passwordEncoder.encodingAlgorithm=SHA-1

#########################################################################

 

Thanks & regards,
Navdeep Singh
Reply all
Reply to author
Forward
0 new messages