users@glassfish.java.net

How to propagate caller principle to Connector Resource

From: <glassfish_at_javadesktop.org>
Date: Mon, 19 Jul 2010 22:59:00 PDT

My application uses the container to authenticate users, however I don't see any pre-authenticated Subjects passed to a connector resource.

I know I can see the currently logged in user within an EJB with:
  currentEJBContext.getCallerPrincipal().getName()

Alas, I'm failing to get a Connector Resource (Jackrabbit2.1 in this case) to see this pre-authenticated Subject when deployed as an JCA Resource within Glassfishv3.

I've looked over the docs for Glassfish3.0.1 but have not found any info on how to achieve propagating the caller principle to the resource. I have found the "run-as-principal-name" option for Weblogic which seems to be what I'm after, is there a Glassfish equivalent?

There doesn't seem to be something like that in any relevant commands (See: http://docs.sun.com/app/docs/doc/820-7693/gilxc).

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

 -- Cory
[Message sent by forum member 'cosmic']

http://forums.java.net/jive/thread.jspa?messageID=478032