Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-91 Implement Authentication Support
  3. OAK-256

JAAS Authentication failing in OSGi env due to classloading issue

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5
    • 0.5
    • jcr

    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

      Attachments

        1. OAK-256-tccl-switch.patch
          5 kB
          Chetan Mehrotra

        Activity

          People

            jukkaz Jukka Zitting
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: