You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Moritz Gmelin <mo...@gmx.de> on 2010/09/13 17:11:57 UTC

Resteasy and security (again)

Hi,

I've been able to create some kind of authentication filter for my tapestry webapp. Now I'd like to have this same filter work with the tapestry-resteasy webservices of the application. But since the resteasy module adds the rest path to the tapestry-ignored-paths. My filter is ignored by the rest services. How can I add filters to the http processing of my rest services?

Thanks

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


Re: Resteasy and security (again)

Posted by Moritz Gmelin <mo...@gmx.de>.
Thanks,

the tapestry-resteasy api document still shows the contributeIgnoredPathsFilter reference. Which is actually not in the ResteasyModule of release 0.2.0

http://tynamo.org/constant/tapestry-resteasy/apidocs/org/tynamo/resteasy/ResteasyModule.html

Regards

Moritz

Am 13.09.2010 um 21:05 schrieb Alejandro Scandroli:

> The new tapestry-resteasy 0.2.0 doesn't use the IgnoredPaths filter anymore.
> This new version doesn't require you to modify your web.xml because is
> implemented as a HttpServletRequestFilter and contributed to the
> HttpServletRequestHandler.
> Are you using tapestry-resteasy 0.2.0? if not I suggest you to
> upgrade. http://tynamo.org/tapestry-resteasy+guide
> 
> If your problem is related to the order of the
> HttpServletRequestFilter in the HttpServletRequestHandler here is the
> resteasy contribution:
> 
> 	public static void
> contributeHttpServletRequestHandler(OrderedConfiguration<HttpServletRequestFilter>
> configuration,
> 	
> @InjectService("ResteasyRequestFilter")
> 	
> HttpServletRequestFilter resteasyRequestFilter)
> 	{
> 		configuration.add("ResteasyRequestFilter", resteasyRequestFilter,
> "before:GZIP");
> 	}
> 
> You can set your filter before resteasy with: "before:ResteasyRequestFilter".
> 
> I hope it helps.
> Saludos.
> Alejandro Scandroli.
> 
> 
> On Mon, Sep 13, 2010 at 5:22 PM, Christophe Cordenier
> <ch...@gmail.com> wrote:
>> Hi !
>> 
>> See how IgnoredPaths filter is contributed in TapestryModule class, then use
>> 
>> before:IgnoredPaths
>> 
>> to execute your filter before Tapestry's one
>> 
>> HTH
>> 
>> 
>> 2010/9/13 Moritz Gmelin <mo...@gmx.de>
>> 
>>> Hi,
>>> 
>>> I've been able to create some kind of authentication filter for my tapestry
>>> webapp. Now I'd like to have this same filter work with the
>>> tapestry-resteasy webservices of the application. But since the resteasy
>>> module adds the rest path to the tapestry-ignored-paths. My filter is
>>> ignored by the rest services. How can I add filters to the http processing
>>> of my rest services?
>>> 
>>> Thanks
>>> 
>>> Moritz
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>> 
>>> 
>> 
>> 
>> --
>> Regards,
>> Christophe Cordenier.
>> 
>> Committer on Apache Tapestry 5
>> Co-creator of wooki @wookicentral.com
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


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


Re: Resteasy and security (again)

Posted by Alejandro Scandroli <al...@gmail.com>.
The new tapestry-resteasy 0.2.0 doesn't use the IgnoredPaths filter anymore.
This new version doesn't require you to modify your web.xml because is
implemented as a HttpServletRequestFilter and contributed to the
HttpServletRequestHandler.
Are you using tapestry-resteasy 0.2.0? if not I suggest you to
upgrade. http://tynamo.org/tapestry-resteasy+guide

If your problem is related to the order of the
HttpServletRequestFilter in the HttpServletRequestHandler here is the
resteasy contribution:

	public static void
contributeHttpServletRequestHandler(OrderedConfiguration<HttpServletRequestFilter>
configuration,
	
@InjectService("ResteasyRequestFilter")
	
HttpServletRequestFilter resteasyRequestFilter)
	{
		configuration.add("ResteasyRequestFilter", resteasyRequestFilter,
"before:GZIP");
	}

You can set your filter before resteasy with: "before:ResteasyRequestFilter".

I hope it helps.
Saludos.
Alejandro Scandroli.


On Mon, Sep 13, 2010 at 5:22 PM, Christophe Cordenier
<ch...@gmail.com> wrote:
> Hi !
>
> See how IgnoredPaths filter is contributed in TapestryModule class, then use
>
> before:IgnoredPaths
>
> to execute your filter before Tapestry's one
>
> HTH
>
>
> 2010/9/13 Moritz Gmelin <mo...@gmx.de>
>
>> Hi,
>>
>> I've been able to create some kind of authentication filter for my tapestry
>> webapp. Now I'd like to have this same filter work with the
>> tapestry-resteasy webservices of the application. But since the resteasy
>> module adds the rest path to the tapestry-ignored-paths. My filter is
>> ignored by the rest services. How can I add filters to the http processing
>> of my rest services?
>>
>> Thanks
>>
>> Moritz
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Committer on Apache Tapestry 5
> Co-creator of wooki @wookicentral.com
>

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


Re: Resteasy and security (again)

Posted by Christophe Cordenier <ch...@gmail.com>.
Hi !

See how IgnoredPaths filter is contributed in TapestryModule class, then use

before:IgnoredPaths

to execute your filter before Tapestry's one

HTH


2010/9/13 Moritz Gmelin <mo...@gmx.de>

> Hi,
>
> I've been able to create some kind of authentication filter for my tapestry
> webapp. Now I'd like to have this same filter work with the
> tapestry-resteasy webservices of the application. But since the resteasy
> module adds the rest path to the tapestry-ignored-paths. My filter is
> ignored by the rest services. How can I add filters to the http processing
> of my rest services?
>
> Thanks
>
> Moritz
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Regards,
Christophe Cordenier.

Committer on Apache Tapestry 5
Co-creator of wooki @wookicentral.com