looks like the database user does not have read access to the user_info table.
regards, Kartik On Mon, Nov 30, 2020 at 12:58 PM cheekian yap <[email protected]> wrote: > #Version > - CAS 6.2.5 > - JDK 11 > > I am new to CAS. Now I'm trying to store all the user credentials in > mysql. Below is what I have configure in *application.properties*: > > #cas.authn.accept.users=casuser::Mellon > #cas.authn.accept.name=Static Credentials > > cas.authn.jdbc.query[0].user=root > cas.authn.jdbc.query[0].password=123456 > cas.authn.jdbc.query[0].driver-class=com.mysql.cj.jdbc.Driver > cas.authn.jdbc.query[0].url=jdbc:mysql:// > 127.0.0.1:3306/cas?useUnicode=true&characterEncoding=UTF-8 > cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect > > cas.authn.jdbc.query[0].sql=select * from user_info where username=? > cas.authn.jdbc.query[0].field-password=password > > in *build.gradle* > dependencies { > implementation > "org.apereo.cas:cas-server-support-jdbc:${project.'cas.version'}" > } > > However, I got this error when filling up the login form: > 2020-11-30 07:21:27,694 ERROR > [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - > <Authentication has failed. Credentials may be incorrect or CAS cannot find > authentication handler that supports > [UsernamePasswordCredential(username=yaptest, source=null, > customFields={})] of type [UsernamePasswordCredential]. Examine the > configuration to ensure a method of authentication is defined and analyze > CAS logs at DEBUG level to trace the authentication event.> > > 2020-11-30 07:21:27,694 ERROR > [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - > <[QueryDatabaseAuthenticationHandler]: [SQL exception while executing query > for yaptest / Failed to obtain JDBC Connection; nested exception is > java.sql.SQLException: Access denied for user 'root'@'localhost']> > > I'm pretty sure the credential for root account is correct. > > > > -- > - Website: https://apereo.github.io/cas > - Gitter Chatroom: https://gitter.im/apereo/cas > - List Guidelines: https://goo.gl/1VRrw7 > - Contributions: https://goo.gl/mh7qDG > --- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/a/apereo.org/d/msgid/cas-user/917506bd-2123-4344-823a-4fabb3c62bc7n%40apereo.org > <https://groups.google.com/a/apereo.org/d/msgid/cas-user/917506bd-2123-4344-823a-4fabb3c62bc7n%40apereo.org?utm_medium=email&utm_source=footer> > . > -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAGg9WmzoiRP_2sjJCE_zE9WRreNqwx-zvFPeEUq63gYeNecBdg%40mail.gmail.com.
