Jackrabbit Oak
  1. Jackrabbit Oak
  2. OAK-91 Implement Authentication Support
  3. OAK-256

JAAS Authentication failing in OSGi env due to classloading issue

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 0.5
    • Component/s: jcr
    • Labels:

      Description

      At times Repository login fails because the LoginModule cannot be instantiated

      Caused by: javax.jcr.LoginException: unable to find LoginModule class: org.apache.jackrabbit.oak.security.authentication.LoginModuleImpl
      	at org.apache.jackrabbit.oak.jcr.RepositoryImpl.login(RepositoryImpl.java:139)
      	at org.apache.jackrabbit.oak.jcr.SessionImpl.impersonate(SessionImpl.java:114)
      	at org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:101)
      	at $Proxy9.impersonate(Unknown Source)
      	at org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet$1.getLongLivedSession(SlingDavExServlet.java:206)
      
      

      As a fix LoginContextProviderImpl should switch the Thread's context classloader (TCCL) to oak-jcr bundle's classloader so that required loginmodule class can be instantiated

        Activity

        Alex Parvulescu made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        angela made changes -
        Parent OAK-91 [ 12554318 ]
        Issue Type Bug [ 1 ] Sub-task [ 7 ]
        Jukka Zitting made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Jukka Zitting [ jukkaz ]
        Fix Version/s 0.5 [ 12322546 ]
        Resolution Fixed [ 1 ]
        Chetan Mehrotra made changes -
        Field Original Value New Value
        Attachment OAK-256-tccl-switch.patch [ 12541531 ]
        Chetan Mehrotra created issue -

          People

          • Assignee:
            Jukka Zitting
            Reporter:
            Chetan Mehrotra
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development