You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Nils Weinander <ni...@mogul.com> on 2010/03/15 21:03:21 UTC

Jackrabbit JAAS login

All examples I have seen of Jackrabbit security configuration use
the SimpleLoginModule. I need to use JAAS login (from Jetty for the
moment), with org.mortbay.jetty.plus.jaas.spi.PropertyFileLoginModule
as login module. My success is limited so far...

I use Jackrabbit 2.0.0, Jetty 6.1.4 and spring-modules-jcr 0.8. The
login module config in respository.xml is like this:

<LoginModule 
class="org.mortbay.jetty.plus.jaas.spi.PropertyFileLoginModule">
    <param name="file" value="src/test/resources/jetty/realm.properties"/>
</LoginModule>

When Spring tries to create a JCR session I get this:
...
Caused by: javax.jcr.LoginException: 
javax.security.auth.callback.UnsupportedCallbackException
         at 
org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1511)
         at 
org.springmodules.jcr.JcrSessionFactory.getSession(JcrSessionFactory.java:268)
         at 
org.springmodules.jcr.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:79)
         at 
org.springmodules.jcr.SessionFactoryUtils.getSession(SessionFactoryUtils.java:119)
         ... 44 more
Caused by: javax.security.auth.login.LoginException: 
javax.security.auth.callback.UnsupportedCallbackException
         at 
org.mortbay.jetty.plus.jaas.spi.AbstractLoginModule.login(AbstractLoginModule.java:251)
         at 
org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
         at 
org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1497)
...

I have run it in the debugger, but since I am not familiar with
any of the code, it doesn't tell me very much what's the problem.

Anyone else recognizing this? spring-modules-jcr problem? Something
missing in configuration?

-- 
mogul | nils weinander |
hudiksvallsgatan 4 113 30 stockholm sweden |
+46 8 4100 6456 | +46 709 78 28 37 |
nils.weinander@mogul.com | skype: nils.weinander |
www.mogul.com