[
https://issues.apache.org/jira/browse/KARAF-2914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Fang resolved KARAF-2914.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.3.6
3.0.2
4.0.0
2.4.0
> JAAS JDBCBackingEngineFactory: Wrong query from the configuration
> -----------------------------------------------------------------
>
> Key: KARAF-2914
> URL: https://issues.apache.org/jira/browse/KARAF-2914
> Project: Karaf
> Issue Type: Bug
> Components: karaf-security
> Affects Versions: 3.0.0
> Reporter: Mike Hummel
> Assignee: Freeman Fang
> Fix For: 2.4.0, 4.0.0, 3.0.2, 2.3.6
>
>
> In JDBCBackingEngineFactory is in line 49 the following code:
> String selectUsersQuery = (String)
> options.get(JDBCLoginModule.PASSWORD_QUERY);
> PASSWORD_QUERY is ""SELECT PASSWORD FROM USERS WHERE USERNAME=?
> but selectUserQuery should be "SELECT USERNAME FROM USERS"
> looks like a mismatch.
> The correct code should be:
> String selectUsersQuery = (String) options.get(JDBCLoginModule.USER_QUERY);
> in JDBCLoginModule.java:
> public static final String USER_QUERY = "query.user"
> and you need a separate selectPasswordQuery attribute.
--
This message was sent by Atlassian JIRA
(v6.2#6252)