Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2914

JAAS JDBCBackingEngineFactory: Wrong query from the configuration

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 2.4.0, 3.0.2, 2.3.6, 4.0.0.M3
    • Component/s: karaf
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Fang
              Reporter:
              mhu Mike Hummel
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: