You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Kristian Koehler (JIRA)" <ji...@apache.org> on 2007/01/11 09:46:48 UTC

[jira] Updated: (SM-812) [patch] JAAS Login for Batch Processes

     [ https://issues.apache.org/activemq/browse/SM-812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Koehler updated SM-812:
--------------------------------

    Attachment: patch.zip

> [patch] JAAS Login for Batch Processes 
> ---------------------------------------
>
>                 Key: SM-812
>                 URL: https://issues.apache.org/activemq/browse/SM-812
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-components
>            Reporter: Kristian Koehler
>         Attachments: patch.zip, patch.zip
>
>
> Hi
> the attached patch includes a PassThroughJAASLoginComponent which forwards a
> Message through the NMR and performs a JAAS login. The JAAS Subject is added to
> the message properties ("javax.jbi.security.subject").
> This component can be used if you have a batch process which should call an JAAS
> secured component (for example a EJB service called with JSR-181). The
> attached StaticValueCallbackHandler for example enables you to configure static
> login information.
> Sample Config:
> --- 8< (start) ---
> ...
> <sm:activationSpec componentName="login" service="foo:login">
>  <sm:component>
> 	<bean class="org.apache.servicemix.components.security.PassThroughJAASLoginComponent">
> 		<property name="loginContext" ref="loginContext" />
> 	</bean>
>  </sm:component>
> </sm:activationSpec>
> ...
> <bean id="loginContext"
> 	class="javax.security.auth.login.LoginContext">
> 	<constructor-arg>
> 		<value>servicemix-domain</value>
> 	</constructor-arg>
> 	<constructor-arg>
> 		<ref local="callbackHandler" />
> 	</constructor-arg>
> </bean>
> <bean id="callbackHandler"
> 	class="org.apache.servicemix.components.security.StaticValueCallbackHandler">
> 	<property name="name" value="first" />
> 	<property name="password" value="secret" />
> </bean>
> ...
> --- 8< (end) ---
> After the PassThroughJAASLoginComponent is invoked and the login could be
> performed you can call JAAS secured endpoints.
> The patch includes test cases for the component.
> Kristian

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira