camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Configuring ShiroSecurityPolicy in XML
Date Thu, 26 Apr 2012 07:10:24 GMT
On Wed, Apr 25, 2012 at 8:03 PM,  <dms79@gmx.de> wrote:
> Hello,
>
> With Camel 2.9.2, how can I configure a route using a ShiroSecurityPolicy in Spring XML
like the following Java sample? I have noticed a policy XML element, but this seems to do
something else.
>
> List<Permission> permissionsList = new ArrayList<Permission>();
> Permission permission = new WildcardPermission("dummy:*");
> permissionsList.add(permission);
>
> ShiroSecurityPolicy shiroSecurityPolicy = new ShiroSecurityPolicy("classpath:dummy.ini",
passPhrase, true, permissionsList);
>
> from("mock:dummy").policy(shiroSecurityPolicy)...
>
> Thanks, Dominik
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

You would need to use the Spring <bean> style for that. To setup the
list of permissions.
And then you can create a bean. Something alike:

<bean id="shiroPolicy" class="...">
  <constructor-arg index="0" value="..."/>
  <constructor-arg index="1" value="secret"/>
  <constructor-arg index="2" value="true"/>
  <constructor-arg index="3" ref="myPermissionList"/>
</bean>

There ought to be plenty of Spring docs how to setup spring beans and
setup lists etc.

-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message