CAS PM JDBC 5.1.5 double query

18 views
Skip to first unread message

William Jojo

unread,
Feb 24, 2018, 12:37:48 PM2/24/18
to CAS Community
My question is very simple. Why on Earth are there two separate calls for validating PM questions? There is a query to get the question(s) followed by what seems like another query to get the answer(s). The format requires the query to be in the form of:

select question, answer from table name where user=?

Fine. But if you are trying to randomly select a question with say a view or procedure, the functionality is effective broken because you cannot guarantee the question/answer pair will match. See below:

2018-02-24 12:26:56,529 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - <Fetching JDBC Connection from DataSource>
2018-02-24 12:26:56,546 TRACE [org.springframework.jdbc.core.StatementCreatorUtils] - <Setting SQL statement parameter value: column index 1, parameter value [THEUSER], value class [java.lang.String], SQL type unknown>
2018-02-24 12:26:56,562 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - <Returning JDBC Connection to DataSource>
2018-02-24 12:26:56,563 DEBUG [org.apereo.cas.pm.jdbc.JdbcPasswordManagementService] - <Found [1] security questions for [THEUSER]>

2018-02-24 12:26:59,489 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - <Executing prepared SQL query>
2018-02-24 12:26:59,490 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - <Executing prepared SQL statement [SELECT question,answer from GENERAL.vTestQA where userid=?]>
2018-02-24 12:26:59,490 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - <Fetching JDBC Connection from DataSource>
2018-02-24 12:26:59,506 TRACE [org.springframework.jdbc.core.StatementCreatorUtils] - <Setting SQL statement parameter value: column index 1, parameter value [THEUSER], value class [java.lang.String], SQL type unknown>
2018-02-24 12:26:59,523 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - <Returning JDBC Connection to DataSource>
2018-02-24 12:26:59,523 DEBUG [org.apereo.cas.pm.jdbc.JdbcPasswordManagementService] - <Found [1] security questions for [THEUSER]>


There is also the concern that the database is not required to return the values in the same order every time.

Bill

Man H

unread,
Feb 24, 2018, 3:28:23 PM2/24/18
to cas-...@apereo.org
Send the same with hibernate debug
--
- 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 cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/6a6e6fab-f5c3-4c98-8a92-72079c0cc412%40apereo.org.

William Jojo

unread,
Feb 26, 2018, 6:44:14 AM2/26/18
to CAS Community
Manfredo,

Hibernate is not posting to my logs. Turned on cas.jdbc.showSql and cas.jdbc.genDdl. Also added org.hibernate, org.hibernate.SQL and org.hibernate.type.descriptor.sql to the log4j2.xml for both debug and trace. Nothing.

This is built using Maven and our own Tomcat server.

Bill
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

Man H

unread,
Feb 26, 2018, 8:00:01 AM2/26/18
to cas-...@apereo.org
Cas is not reading your properties. Check where they are fetched
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/32e639e7-28d9-436e-a744-416287d15489%40apereo.org.

joj...@gmail.com

unread,
Feb 26, 2018, 7:04:28 PM2/26/18
to cas-...@apereo.org
It has to be reading my properties or else I could never switch  between MySQL and Oracle which I do all day long. It has to be something else.

Bill

Sent from a device.

Man H

unread,
Feb 26, 2018, 7:27:45 PM2/26/18
to cas-...@apereo.org
send cas startup log

--
- 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 cas-user+unsubscribe@apereo.org.

--
- 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 cas-user+unsubscribe@apereo.org.

William Jojo

unread,
Feb 27, 2018, 6:42:16 AM2/27/18
to CAS Community
Log attached. Simply started and stopped the CAS service.
send cas startup log

--
- 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 cas-user+u...@apereo.org.
cas.log.3
Reply all
Reply to author
Forward
0 new messages