glassfish
  1. glassfish
  2. GLASSFISH-3023

JDBCRealm should support different table structures

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 9.1pe
    • Fix Version/s: not determined
    • Component/s: security
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Linux

    • Issuezilla Id:
      3,023

      Description

      In SJSAS 9.0 I used net.java.glassfish.security.auth.realm.jdbc.JDBCRealm for
      authentication as it supports the following use properties:

      find-user-query
      find-groups-query

      It's useful because my databases use many-to-many relationships for users and
      usergroups, i.e.:

      SELECT id FROM user WHERE email = ? AND password = ?

      SELECT usergroup.name FROM user, usergroup, user_usergroup WHERE user.email = ?
      AND user_usergroup.user
      _id = user.id AND user_usergroup.usergroup_id = usergroup.id

      Those properties allowed me to use the above queries to define how user
      names/passwords and user group names should be checked.

      Can these properties be added to
      com.sun.enterprise.security.auth.login.JDBCLoginModule ? Looking at the source
      for JDBCLoginModule it would be a fairly simple extension.

      In 9.1 using net.java.glassfish.security.auth.realm.jdbc.JDBCRealm has become
      more difficult as com.sun.gjc.spi.DataSource for which it needs to function are
      no longer packaged in $

      {com.sun.aas.installRoot}

      /lib/appserv-rt.jar

      Thanks

      Dan

        Activity

        danielrhoades created issue -
        Hide
        whartung added a comment -

        Not to be difficult, it's a fine idea, but it can also be readily worked around by creating a standard SQL
        VIEW to make whatever structure the DB is using look like what the realm expects to see, particularly since
        what the JDBC realm wants is so basic.

        Show
        whartung added a comment - Not to be difficult, it's a fine idea, but it can also be readily worked around by creating a standard SQL VIEW to make whatever structure the DB is using look like what the realm expects to see, particularly since what the JDBC realm wants is so basic.
        Hide
        danielrhoades added a comment -

        Nice idea I didn't consider that, but some databases don't support views in
        particular MySQL 4 (it was added in 5.0), lucky for me though we're using 5.0 so
        I'll have a look into it, thanks.

        Show
        danielrhoades added a comment - Nice idea I didn't consider that, but some databases don't support views in particular MySQL 4 (it was added in 5.0), lucky for me though we're using 5.0 so I'll have a look into it, thanks.
        Hide
        Shing Wai Chan added a comment -

        reassign

        Show
        Shing Wai Chan added a comment - reassign
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 3023 34627
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
        Tom Mueller made changes -
        Fix Version/s not determined [ 11149 ]
        Fix Version/s 9.1pe [ 10974 ]

          People

          • Assignee:
            raharsha
            Reporter:
            danielrhoades
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: