Hi,

As a quick follow-up to my earlier post, this is how the Shiro component
works (Check out the tests in ShiroAuthorizationTest.java).

In Camel Route
-----------------
     from(XXX)
        .policy(MyAuthZPolicy)
        .to(YYY)

Note MyAuthZPolicy reads the ShiroConfiguration.ini file to figure out the
auth/authz rules to apply when messages/exchanges are received.

In Client sending an exchange to Camel Route Consumer XXX
---------------------------------------------------------------------

a> First, Create a ShiroSecurityToken...
b> Inject the token into an Exchange along with the message being sent to
the endpoint. This token is matched against the configuration to figure out
authentication and authorization to access the route or route segments. Note
that you can have multiple policies on different route segments (in case of
choices in DSL) and the permission sets & token sent dictate the messages
continuing forward on a route segment.
c> Send the token to the consumer.

In any case, the unit tests attached in the link above should help greatly
in figuring out how to use the shire component and any lingering questions
you have.

In any case, if you run into questions/issues, please post a follow-on
question.

Cheers,

Ashwin...



-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-Shiro-be-used-with-camel-to-limit-access-to-a-route-tp5521623p5525360.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to