Have you included CAS' JDBC authentication module dependency in your overlay's 
build config (Maven or Gradle)?

Best,
D.

On Feb 3, 2017, 03:04 -0500, Jihad Talic <jihad.ta...@gmail.com>, wrote:
> Hello,
>
> I am experiencing issues regarding my Database authentication configuration 
> in my CAS 5.0.1 server. The database I'm connecting with my CAS server uses 
> PostgreSQL, and deploying the overlay build in Tomcat 8.5. First of all, I 
> have enabled Database Authentication in the application.properties, 
> specifically the Encode handler, since the database uses a salt value for 
> hashing the password. As far as I know, I have applied the most basic 
> configuration for the database authentication setup, but if I try to 
> authenticate directly against the CAS server (not redirected from any url), 
> it always end up not being successful. I am very sure that I am using the 
> correct credentials, but I still experience an invalid authentication.
>
> Originally, I am accessing the database from a remote, but I also tried using 
> a local PostgreSQL database with similar unfortunate results. This is the 
> basic configuration I'm using in the application.properties (I purposely used 
> my local setup and some example values here):
>
> cas.authn.jdbc.encode[0].sql=SELECT password FROM public.user WHERE email=?
> cas.authn.jdbc.encode[0].url=jdbc:postgresql://localhost:5432/tracking
> cas.authn.jdbc.encode[0].driverClass=org.postgresql.Driver
> cas.authn.jdbc.encode[0].user=sample_username
> cas.authn.jdbc.encode[0].password=sample_password
> cas.authn.jdbc.encode[0].saltFieldName=salt
> cas.authn.jdbc.encode[0].passwordFieldName=password
>
>
> 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
>
>
> The password encoder setup should be right since the database uses SHA-1 
> password encryption.
>
> This is what the tomcat logs says about:
>
> 2017-02-03 15:06:33,024 WARN 
> [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - 
> <Authentication has failed. Credentials may be incorrect or CAS cannot find 
> authentication handler that supports [jihad] of type 
> [UsernamePasswordCredential], which suggests a configuration problem.>
> 2017-02-03 15:06:33,075 INFO 
> [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit 
> trail record BEGIN
> =============================================================
> WHO: jihad
> WHAT: Supplied credentials: [jihad]
> ACTION: AUTHENTICATION_FAILED
> APPLICATION: CAS
> WHEN: Fri Feb 03 15:06:33 PHT 2017
> CLIENT IP ADDRESS: 127.0.0.1
> SERVER IP ADDRESS: 127.0.0.1
> =============================================================
>
> >
> 2017-02-03 15:06:33,210 ERROR 
> [org.apereo.cas.web.flow.AuthenticationExceptionHandler] - <Unable to 
> translate handler errors of the authentication exception 
> org.apereo.cas.authentication.AuthenticationException: 1 errors, 0 successes. 
> Returning UNKNOWN by default...>
>
>
> I am hoping someone could help about this issue. Thank you in advance.
>
> --Jihad
>
>
>
>
> --
> - CAS gitter chatroom: https://gitter.im/apereo/cas
> - CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
> - CAS documentation website: https://apereo.github.io/cas
> - CAS project website: https://github.com/apereo/cas
> ---
> 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 cas-user+unsubscr...@apereo.org 
> (mailto:cas-user+unsubscr...@apereo.org).
> To view this discussion on the web visit 
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/b82b736e-7389-46a3-872b-53778b6acd64%40apereo.org
>  
> (https://groups.google.com/a/apereo.org/d/msgid/cas-user/b82b736e-7389-46a3-872b-53778b6acd64%40apereo.org?utm_medium=email&utm_source=footer).

-- 
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
--- 
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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/14ea95a6-970a-40d0-a8a4-5f9df8e098a7%40Spark.

Reply via email to