Re: [jira] [Assigned] (TOMEE-2118) @RunAs does not work properly when it is used in servlet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [jira] [Assigned] (TOMEE-2118) @RunAs does not work properly when it is used in servlet

jgallimore
I'll pick this one up.

Thanks

Jon

On Thu, Aug 17, 2017 at 11:49 AM, Jonathan Gallimore (JIRA) <[hidden email]
> wrote:

>
>      [ https://issues.apache.org/jira/browse/TOMEE-2118?page=
> com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Jonathan Gallimore reassigned TOMEE-2118:
> -----------------------------------------
>
>     Assignee: Jonathan Gallimore
>
> > @RunAs does not work properly when it is used in servlet
> > --------------------------------------------------------
> >
> >                 Key: TOMEE-2118
> >                 URL: https://issues.apache.org/jira/browse/TOMEE-2118
> >             Project: TomEE
> >          Issue Type: Bug
> >    Affects Versions: 7.0.3
> >            Reporter: Kaloyan Spiridonov
> >            Assignee: Jonathan Gallimore
> >
> > I have the following scenario:
> > Servlet -> EjbOne -> EjbTwo
> > My expectation is that @RunAs of the servlet will be propagated to EjbOne
> > and the @RunAs of the EjbOne will be propagated to @EjbTwo.
> > But this does not happen - see the output below. When i remove @RunAs
> > annotation from the servlet the @RunAs of EjbOne is propagated correctly.
> > Actual output:
> > EjbOne (Before EjbTwo) expected role: Manager, isCallerInRole("Manager"):
> > false
> > EjbOne (Before EjbTwo) expected role: Manager, isCallerInRole("VP"):
> false
> > EjbOne (Before EjbTwo) expected role: Manager,)
> > isCallerInRole("Administrator"): false
> > EjbTwo expected role: VP, isCallerInRole("Manager"): false
> > EjbTwo expected role: VP, isCallerInRole("VP"): false
> > EjbTwo expected role: VP, isCallerInRole("Administrator"): false
> > EjbOne (After EjbTwo) expected role: Manager, isCallerInRole("Manager"):
> > false
> > EjbOne (After EjbTwo) expected role: Manager, isCallerInRole("VP"): false
> > EjbOne (After EjbTwo) expected role: Manager,
> > isCallerInRole("Administrator"): false
> > Expected output:
> > EjbOne (Before EjbTwo) expected role: Manager, isCallerInRole("Manager"):
> > true
> > EjbOne (Before EjbTwo) expected role: Manager, isCallerInRole("VP"):
> false
> > EjbOne (Before EjbTwo) expected role: Manager,)
> > isCallerInRole("Administrator"): false
> > EjbTwo expected role: VP, isCallerInRole("Manager"): false
> > EjbTwo expected role: VP, isCallerInRole("VP"): true
> > EjbTwo expected role: VP, isCallerInRole("Administrator"): false
> > EjbOne (After EjbTwo) expected role: Manager, isCallerInRole("Manager"):
> > true
> > EjbOne (After EjbTwo) expected role: Manager, isCallerInRole("VP"): false
> > EjbOne (After EjbTwo) expected role: Manager,
> > isCallerInRole("Administrator"): false
> > Here is the source of the application: https://github.com/kal0ian/
> Examples
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.4.14#64029)
>