[cas-user] Re: CAS Authentication Exception

2019-04-05 Thread Andrey Seledkov
Ray, you was right

I forgot about dependecy

compile "org.apereo.cas:cas-server-support-jdbc:${project.'cas.version'}"


Thanks a lot!


пятница, 5 апреля 2019 г., 13:56:55 UTC+3 пользователь Andrey Seledkov 
написал:
>
> Hello team.
>
> I setup cas overlay template , version 6.0.3
>
> I am trying to authenticate user ,  but got next stack trace , please 
> assist
>
> My application.properties
>
> cas.authn.accept.users=
> cas.authn.accept.name=
> cas.jdbc.showSql=true
> cas.authn.jdbc.query[0].sql=SELECT password FROM users WHERE username=?
> cas.authn.jdbc.query[0].url=jdbc:mysql://localhost:3306/test
> cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQL8Dialect
> cas.authn.jdbc.query[0].user=root
> cas.authn.jdbc.query[0].password=
> cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver
> cas.authn.jdbc.query[0].fieldPassword=password
> cas.authn.jdbc.query[0].passwordEncoder.type=NONE
> cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
>
>
> and my registry service
>
> {
>   "@class": "org.apereo.cas.services.RegexRegisteredService",
>   "serviceId": "^https://localhost;,
>   "name": "HTTPS/IMAPS wildcard",
>   "id": 1001,
>   "evaluationOrder": 9,
> }
>
>
>
> WHO: test 
>   
>   
>  WHAT: Supplied credentials: 
> [UsernamePasswordCredential(username=test, source=null)]  
>   
>   
>  ACTION: AUTHENTICATION_FAILED
>   
>   
>   APPLICATION: CAS
>   
>   
>   
>  WHEN: Fri Apr 05 13:38:14 EEST 2019  
>   
>   
>   CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1  
>   
>   
>   
>  SERVER IP ADDRESS: 0:0:0:0:0:0:0:1   
>   
>   
>   
> = 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>  13:38:14.076 [https-jsse-nio-8443-exec-7] 
> DEBUG 
> org.apereo.cas.web.flow.resolver.impl.DefaultCasDelegatingWebflowEventResolver
>  - 0 errors, 0 successes  
>
> org.apereo.cas.authentication.AuthenticationException: 0 errors, 0 successes  
>   
>   
>  at 
> org.apereo.cas.authentication.PolicyBasedAuthenticationManager.evaluateFinalAuthentication(PolicyBasedAuthenticationManager.java:349)
>  ~[cas-server-core-authentication-api-6.0.3-SNAPSHOT.jar!/:6.0.3-SNAPSHOT]
>  at 
> 

Re: [cas-user] Re: CAS Authentication Exception

2019-04-05 Thread Ray Bon
Andrey,

It looks like your jdbc handler is not recognized. I have this in my log 
(5.2.7):

DEBUG [aper.cas.auth.RegisteredServiceAuthenticationHandlerResolver] - 


Check your config file location and where CAS thinks it should be.

Ray

On Fri, 2019-04-05 at 11:30 -0700, Andrey Seledkov wrote:
As i see issue here not with sql query , it is didnt get to sql , becasue 
failed before it

I thinf issue here


21:22:12.966 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.PolicyBasedAuthenticationManager - Authentication 
credentials provided for this transaction are [[UsernamePasswordCredentia




l(username=test, source=null)]]




21:22:12.977 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Candidate/Registered authentication handlers for this transaction are 
[[org.apere




o.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler@e890591]]




21:22:12.977 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - Sorted 
and registered authentication handler resolvers for this transaction are [




[org.apereo.cas.authentication.handler.RegisteredServiceAuthenticationHandlerResolver@2d9df336]]




21:22:12.978 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Authentication handler resolvers for this transaction are 
[[org.apereo.cas.authen




tication.handler.RegisteredServiceAuthenticationHandlerResolver@2d9df336]]




21:22:12.978 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Authentication handler resolvers produced no candidate authentication handler. 
Us




ing the default handler resolver instead...




21:22:12.980 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.AuthenticationHandlerResolver - Default 
authentication handlers used for this transaction are 
[HttpBasedServiceCredentialsA




uthenticationHandler]




21:22:12.980 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Resolved and finalized authentication handlers to carry out this authentication 
t




ransaction are 
[[org.apereo.cas.authentication.handler.RegisteredServiceAuthenticationHandlerResolver@2d9df336]]




21:22:12.980 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.PolicyBasedAuthenticationManager - Candidate 
resolved authentication handlers for this transaction are [[org.apereo.cas.aut




hentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler@e890591]]




21:22:12.980 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.PolicyBasedAuthenticationManager - Attempting to 
authenticate credential [UsernamePasswordCredential(username=test, source=




null)]




21:22:12.982 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.PolicyBasedAuthenticationManager - Authentication 
handler [HttpBasedServiceCredentialsAuthenticationHandler] does not suppo




rt the credential type [UsernamePasswordCredential(username=test, 
source=null)]. Trying next...




21:22:12.984 [https-jsse-nio-8443-exec-7] INFO  
org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager - Audit trail 
record BEGIN




Default handler is HttpBasedServiceCredentialsAuthenticationHandler which does 
not support UsernamePasswordCredential


 does not suppo




rt the credential type [UsernamePasswordCredential(username=test, source=null)]




пятница, 5 апреля 2019 г., 13:56:55 UTC+3 пользователь Andrey Seledkov написал:
Hello team.

I setup cas overlay template , version 6.0.3

I am trying to authenticate user ,  but got next stack trace , please assist

My application.properties


cas.authn.accept.users

=



cas.authn.accept.name

=


cas.jdbc.showSql

=

true


cas.authn.jdbc.query[0].sql

=

SE

LECT password FROM users WHERE username=?


cas.authn.jdbc.query[0].url

=

jd

bc:mysql://localhost:3306/test


cas.authn.jdbc.query[0].

dialect

=

org.hibernate.dialect.

MySQL8Dialect


cas.authn.jdbc.query[0].user

=

r

oot


cas.authn.jdbc.query[0].

password

=




cas.authn.jdbc.query[0].

driverClass

=

com.mysql.jdbc.

Driver


cas.authn.jdbc.query[0].

fieldPassword

=

password


cas.authn.jdbc.query[0].

passwordEncoder.type

=

NONE


cas.authn.jdbc.query[0].

passwordEncoder.

characterEncoding

=

UTF-8


and my registry service


{




"@class"

:

"org.apereo.cas.services.

RegexRegisteredService"

,




"serviceId"

:

"^



https://localhost

"

,




"name"

:

"HTTPS/IMAPS wildcard"

,




"id"

:

1001

,




"evaluationOrder"

:

9

,


}



WHO: test


WHAT: Supplied credentials: [UsernamePasswordCredential(

username=test, source=null)]


ACTION: AUTHENTICATION_FAILED


APPLICATION: CAS


WHEN: Fri Apr 05 13:38:14 EEST 2019


CLIENT IP ADDRESS: 

[cas-user] Re: CAS Authentication Exception

2019-04-05 Thread Andrey Seledkov
As i see issue here not with sql query , it is didnt get to sql , becasue 
failed before it

I thinf issue here

21:22:12.966 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.PolicyBasedAuthenticationManager - Authentication 
credentials provided for this transaction are [[UsernamePasswordCredentia   
   l(username=test, 
source=null)]]  


  21:22:12.977 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Candidate/Registered authentication handlers for this transaction are 
[[org.apere 
 
o.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler@e890591]]


21:22:12.977 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - Sorted 
and registered authentication handler resolvers for this transaction are [  

[org.apereo.cas.authentication.handler.RegisteredServiceAuthenticationHandlerResolver@2d9df336]]


   21:22:12.978 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Authentication handler resolvers for this transaction are 
[[org.apereo.cas.authen 
 
tication.handler.RegisteredServiceAuthenticationHandlerResolver@2d9df336]]  


   21:22:12.978 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Authentication handler resolvers produced no candidate authentication handler. 
Us  ing the 
default handler resolver instead... 


   21:22:12.980 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.AuthenticationHandlerResolver - Default 
authentication handlers used for this transaction are 
[HttpBasedServiceCredentialsA   
   uthenticationHandler]


  21:22:12.980 
[https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan - 
Resolved and finalized authentication handlers to carry out this authentication 
t  
ransaction are 
[[org.apereo.cas.authentication.handler.RegisteredServiceAuthenticationHandlerResolver@2d9df336]]

   
21:22:12.980 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.PolicyBasedAuthenticationManager - Candidate 
resolved authentication handlers for this transaction are [[org.apereo.cas.aut  

hentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler@e890591]]


 21:22:12.980 [https-jsse-nio-8443-exec-7] DEBUG 
org.apereo.cas.authentication.PolicyBasedAuthenticationManager - Attempting to 
authenticate credential [UsernamePasswordCredential(username=test, source=  
null)]