Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-3899

Extend TokenLoginModule to respect shared key javax.security.auth.login.name

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.3.14
    • None
    • core
    • None

    Description

      The TokenLoginModule and specifically TokenProviderImpl only look at SimpleCredentials.getUserID() when creating a token.

      However, in certain situations, such as with the ExternalLoginModule and non-username/password credentials, the SimpleCredentials are used but don't have a user id as the real user id is determined not by the caller of Repository.login(), but by the external identity provider inside the ExternalLoginModule (and the credentials might not include any kind of user id, say an opaque token from an external service). In this case, SimpleCredentials.getUserID() returns null and the token implementation fails to create a token and does not return it in the .token attribute of the credentials.

      Instead, the TokenLoginModule should look at the shared javax.security.auth.login.name attribute, which can de-facto override a SimpleCredentials.getUserID(), as it happens in the ExternalLoginModule.

      Attachments

        1. OAK-3899.patch
          10 kB
          Alexander Klimetschek

        Issue Links

          Activity

            People

              angela Angela Schreiber
              alexander.klimetschek Alexander Klimetschek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: