You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Taha Hafeez <ta...@gmail.com> on 2010/10/18 18:07:36 UTC

T5: Where to implement security ?

Hi everyone!

I was looking at the source code of a number of projects related to security
and also read related articles (including one at Tapestry Central).
I want to know whether to implement security by implementing
ComponentEventRequestFilter or ComponentRequestFilter or
RequestFilter or in Dispatcher..

What is the difference ?

When should each be used ?

regards
Taha

Re: T5: Where to implement security ?

Posted by Taha Hafeez <ta...@gmail.com>.
Thanks, I am not doing anything specific so can't be any specific. I am just
digging into the source code of different security integrations and got
confused about the specific purpose of these filters... But now it is quite
clear. thanks to you..

Taha


On Mon, Oct 18, 2010 at 10:46 PM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Mon, 18 Oct 2010 14:23:26 -0200, Taha Hafeez <ta...@gmail.com>
> wrote:
>
>  Thanks for such a quick response...
>> Let me rephrase it...
>>
>> When should I use ComponentEventRequestFilter or ComponentRequestFilter or
>> RequestFilter.
>>
>
> RequestFilter is invoked for any request, including resource (images,
> JavaScript, CSS, etc) ones. ComponentEventRequestFilter is only invoked in
> event requests. ComponentRequestFilter is invoked for render and event
> (action) requests.
>
>
>  1. Component Level.
>> 2. Method Level.
>>
>
> You'd need to implement a ComponentClassTransformer for that.
>
>  3. Package Level.
>>
>
> There's no way to do that.
>
>
>  4. may be mixin level.
>>
>
> I don't know what you mean here.
>

>  5. Page Level
>>
>
> ComponentRequestFilter.
>
> Please describe specific needs instead of broad ones like that and we'll be
> able to provide better answers.
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5: Where to implement security ?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 18 Oct 2010 14:23:26 -0200, Taha Hafeez <ta...@gmail.com>  
wrote:

> Thanks for such a quick response...
> Let me rephrase it...
>
> When should I use ComponentEventRequestFilter or ComponentRequestFilter  
> or RequestFilter.

RequestFilter is invoked for any request, including resource (images,  
JavaScript, CSS, etc) ones. ComponentEventRequestFilter is only invoked in  
event requests. ComponentRequestFilter is invoked for render and event  
(action) requests.

> 1. Component Level.
> 2. Method Level.

You'd need to implement a ComponentClassTransformer for that.

> 3. Package Level.

There's no way to do that.

> 4. may be mixin level.

I don't know what you mean here.

> 5. Page Level

ComponentRequestFilter.

Please describe specific needs instead of broad ones like that and we'll  
be able to provide better answers.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Where to implement security ?

Posted by Taha Hafeez <ta...@gmail.com>.
Thanks for such a quick response...
Let me rephrase it...

When should I use ComponentEventRequestFilter or ComponentRequestFilter or
RequestFilter.

I know they are part of request processing but if I am implementing security
at

1. Component Level.
2. Method Level.
3. Package Level.
4. may be mixin level.
5. Page Level

what interface should i implement?

regards
Taha


On Mon, Oct 18, 2010 at 9:44 PM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Mon, 18 Oct 2010 14:07:36 -0200, Taha Hafeez <ta...@gmail.com>
> wrote:
>
>  Hi everyone!
>>
>
> Hi!
>
>
>  I was looking at the source code of a number of projects related to
>> security and also read related articles (including one at Tapestry Central).
>> I want to know whether to implement security by implementing
>> ComponentEventRequestFilter or ComponentRequestFilter or
>> RequestFilter or in Dispatcher..
>>
>
> Security is not something you implement in a single place. For
> application-wide (inter-page) security, ComponentRequestFilter is the one I
> recommend.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5: Where to implement security ?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 18 Oct 2010 14:07:36 -0200, Taha Hafeez <ta...@gmail.com>  
wrote:

> Hi everyone!

Hi!

> I was looking at the source code of a number of projects related to  
> security and also read related articles (including one at Tapestry  
> Central).
> I want to know whether to implement security by implementing
> ComponentEventRequestFilter or ComponentRequestFilter or
> RequestFilter or in Dispatcher..

Security is not something you implement in a single place. For  
application-wide (inter-page) security, ComponentRequestFilter is the one  
I recommend.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org