jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cory Prowse <c...@prowse.com>
Subject JAAS Subject not propagating to JCA
Date Sat, 17 Jul 2010 02:52:38 GMT

I'm failing to get Jackrabbit to see a pre-authenticated Subject when deployed as a JCA Resource
within Glassfishv3.

My application uses the container to authenticate users, and I can see the currently logged
in user within an EJB with:

Alas, when I ask Jackrabbit for the UserID I always get "anonymous".

This is the method I'm using for obtaining the UserID from Jackrabbit:

public String getUserID() throws LoginException, RepositoryException {
    final Session session = repository.login();
    try {
        return session.getUserID();
    } finally {

My repository.xml contains the following security config:

<Security appName="Jackrabbit">
	<AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">

	<LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
		<param name="anonymousId" value="anonymous" />

I have traced the code into the RepositoryImpl.extendAuthentication method and it seems the
AccessControlContext is not propagated to the Jackrabbit JCA.

I'd really appreciate any insight into how to make this work.

 -- Cory
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message