[ 
https://issues.apache.org/jira/browse/SMX4NMR-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014583#comment-13014583
 ] 

Kurt Westerfeld commented on SMX4NMR-265:
-----------------------------------------

I love this change as it it obviates the need for the java-side code to worry 
about using JBIContext when using servicemix-cxf-se.  Can we easily setup those 
types of endpoints using OSGi metadata or similar as being "subject aware"?  It 
wasn't obvious how to make the adjustment from the new constants in endpoint.  

On the sender side, if one does an invocation within a Subject.doAs(), it would 
be similarly awesome of cxfse:proxy would lookup such a Subject within a 
context to propagate to outbound endpoints. Just need to be sure to check if 
there is an access control context as Subject.getSubject() will throw an NPE if 
you blindly pass AccessController.getContext() through.

I made a patch to cxfse:proxy which does something along the lines of lookup of 
the subject from JBIContext in this case, but it would be more appropriate to 
additionally lookup the current subject context in this way.

> Allow invoking an endpoint as the Subject passed along in the Message
> ---------------------------------------------------------------------
>
>                 Key: SMX4NMR-265
>                 URL: https://issues.apache.org/jira/browse/SMX4NMR-265
>             Project: ServiceMix NMR
>          Issue Type: Improvement
>    Affects Versions: 1.4.0
>            Reporter: Gert Vanthienen
>            Assignee: Gert Vanthienen
>             Fix For: 1.5.0
>
>
> The NMR API allow for the Message to contain a SecuritySubject.  We should 
> improve the NMR endpoint to (optionally) support being invoked on behalf of 
> that Subject (using {{Subject.doAs(...)}}) so that any code inside the 
> endpoint can easily access this information through the 
> {{Subject.getSubject(...)}} method.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to