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

JAAS JDBCBackingEngineFactory: Wrong query from the configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 2.4.0, 3.0.2, 2.3.6, 4.0.0.M3
    • karaf
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: