Figured it out. Stupid me. I am using MariaDB as the SQL backend and
configured the MySQL driver instead of the MariDB one. After cleaning this
up everything started to work.
On Monday, December 5, 2016 at 11:32:26 AM UTC+10:30, Mate Gabri wrote:
>
> Hi,
>
> since I am just getting acquainted with CAS I am certain that my issue is
> configuration or concept related, so first of all I would like to seek the
> guidance of the community on how to properly configure the stack the way I
> thought so, if that is possible at all.
>
> I started out with CAS 5.0.0 using the Maven overlay and configured the
> Trusted authentication webflow, since Apache handles the authentication in
> a standardized way throughout the company. The username gets resolved, the
> login works on the /cas-login page.
>
> Next I wanted to extend the platform with attribute resolution, but
> apparently this part is not working.
>
> I created a simple MySQL *users *table in the *cas* database like the
> following:
>
> +--------+------------+-----------+----------------------------+
> | uid | first_name | last_name | email |
> +--------+------------+-----------+----------------------------+
> | mgabri | Mate | Gabri | mate.gabri@[obscured] |
> +--------+------------+-----------+----------------------------+
>
> The relecant cas.properties settings are the following, which may be the
> first source of error:
>
> cas.authn.attributeRepository.jdbc.singleRow=true
> cas.authn.attributeRepository.jdbc.requireAllAttributes=true
>
> cas.authn.attributeRepository.jdbc.sql=SELECT * FROM users WHERE {0}
> cas.authn.attributeRepository.jdbc.username=uid
> cas.authn.attributeRepository.jdbc.url=[obscured]
> cas.authn.attributeRepository.jdbc.driverClass=com.mysql.cj.jdbc.Driver
> cas.authn.attributeRepository.jdbc.user=[obscured]
> cas.authn.attributeRepository.jdbc.password=[obscured]
>
> In the logs I can catch the following lines:
>
> Dec 5 11:06:31 [obscured] CAS:
> PrincipalBearingCredentialsAuthenticationHandler successfully authenticated
> mgabri
> Dec 5 11:06:31 [obscured] CAS: Executing prepared SQL query
> Dec 5 11:06:31 [obscured] CAS: Executing prepared SQL statement [SELECT *
> FROM users WHERE uid = ?]
> Dec 5 11:06:31 [obscured] CAS: Fetching JDBC Connection from DataSource
> Dec 5 11:06:32 [obscured] CAS: Recovering From Exception thrown by
> 'org.apereo.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao@431b08dc'
> Dec 5 11:06:32 [obscured] CAS: Authenticated principal [mgabri] and
> attributes {} with credentials [mgabri].
>
> As you can see the *SingleRowJdbcPersonAttributeDao *is recovering from
> an exception, but I was not able to figure out a way to have more insight
> in what is really happening. Unfortunately I am not familiar with Java
> applications at all so it is a bit hard for me to even start to look for
> solution.
>
> I would like to humbly ask the community to provide me some guidance on
> how to proceed or enlighten me that what I want to achieve is possible at
> all.
>
> I have attached the pom.xml since that is a bit long.
>
> Kind regards,
> Mate
>
--
- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/cf51b0eb-fcde-41c3-9eea-8d310916dfaa%40apereo.org.