You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Paul Merlin <es...@n0pe.org> on 2011/01/10 16:52:52 UTC

Apache Shiro in an EAR containing multiple WARs

Hey,

Let's say you have an application packaged as an EAR containing multiple WARs. 
Each WAR expose some URLs that you want to filter with Shiro.

How would one setup Shiro in such a case ? Should each WAR declare it's own 
filters and URLs ?

/Paul


Re: Apache Shiro in an EAR containing multiple WARs

Posted by Michał Minicki <ma...@aie.pl>.
This makes a good candidate for an example on how to set up Shiro. It
is a common setup in an enterprise environment (I mean a number of
wars in an enterprise archive). Someone should really think it through
and prepare some decent and thorough documentation for this case.

Best regards,
Michał Minicki

On Thu, Jan 13, 2011 at 20:07, Les Hazlewood <lh...@apache.org> wrote:
> Hi Paul,
>
> I would think each war would declare its own ShiroFilter.  The
> ShiroFilter would probably reference the Shiro SecurityManager that is
> created once by your EAR.  That is, something in the EAR creates a
> single Shiro SecurityManager instance, and that instance is referenced
> by all the WAR files when building the war's specific ShiroFilter
> instance (which secures its own URLs).
>
> Does that make sense?
>
> Les
>
> On Mon, Jan 10, 2011 at 7:52 AM, Paul Merlin <es...@n0pe.org> wrote:
>> Hey,
>>
>> Let's say you have an application packaged as an EAR containing multiple WARs.
>> Each WAR expose some URLs that you want to filter with Shiro.
>>
>> How would one setup Shiro in such a case ? Should each WAR declare it's own
>> filters and URLs ?
>>
>> /Paul
>

-- 
Michał Minicki
martel@post.pl

Re: Apache Shiro in an EAR containing multiple WARs

Posted by Les Hazlewood <lh...@apache.org>.
Hi Paul,

I would think each war would declare its own ShiroFilter.  The
ShiroFilter would probably reference the Shiro SecurityManager that is
created once by your EAR.  That is, something in the EAR creates a
single Shiro SecurityManager instance, and that instance is referenced
by all the WAR files when building the war's specific ShiroFilter
instance (which secures its own URLs).

Does that make sense?

Les

On Mon, Jan 10, 2011 at 7:52 AM, Paul Merlin <es...@n0pe.org> wrote:
> Hey,
>
> Let's say you have an application packaged as an EAR containing multiple WARs.
> Each WAR expose some URLs that you want to filter with Shiro.
>
> How would one setup Shiro in such a case ? Should each WAR declare it's own
> filters and URLs ?
>
> /Paul