You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andy Pahne <an...@googlemail.com> on 2010/08/26 16:14:49 UTC
Can't contribute RegexAuthorizer / classpath assets not being served
[5.2.0]
I am working with Tapestry 5.2.0. Some classpath assets are denied access.
In the document
http://tapestry.apache.org/tapestry5.2-dev/guide/assets.html
under "Securing Assets" it is said that I can contribute in my AppModule
like this:
public void contributeRegexAuthorizer(final Configuration<String> configuration)
{
String pattern = "([^/.]+/)*[^/.]+\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif))$";
configuration.add("^org/resources/" + pattern);
}
I simply copied that from the docs but then my application won't start anymore. The error message is:
java.lang.IllegalArgumentException: Contribution xxx.web.services.AppModule.contributeRegexAuthorizer(Configurati
on) (at AppModule.java:30) is for service 'RegexAuthorizer', which does not exist.
at org.apache.tapestry5.ioc.internal.RegistryImpl.validateContributeDefs(RegistryImpl.java:225)
at org.apache.tapestry5.ioc.internal.RegistryImpl.<init>(RegistryImpl.java:201)
at org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:170)
at org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(TapestryAppInitializer.java:214)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:95)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
Am I missing something or is the documentation outdated?
Andy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Can't contribute RegexAuthorizer / classpath assets not being
served [5.2.0]
Posted by Alex Kotchnev <ak...@gmail.com>.
Although not a part of T5.2 , RegexAuthorizer is still available as a 3rd
party module in a maven repo and is still a good way that you can secure
the assets in your app, see
https://issues.apache.org/jira/browse/TAP5-815for more details on the
maven repository.
Regards,
Alex K
On Thu, Aug 26, 2010 at 11:41 AM, Andy Pahne <an...@googlemail.com>wrote:
>
> So, I found out that the documentation is outdated.
>
> There once was a RegeyAuthorizer that was part of tapestry-core
> 5-2-0-SNAPSHOT, as you can see here:
>
> http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/internal/services/RegexAuthorizer.html
>
> Checking the current source I find that there is no RegexAuthorizer
> anymore, not in 5.2.0 and not in 5.2.1-SNAPSHOT.
>
> The upgrade instructions also don't mention this.
>
> I am still searching for a solution...
>
> Andy
>
>
> Am 26.08.2010 16:14, schrieb Andy Pahne:
>
>
>> I am working with Tapestry 5.2.0. Some classpath assets are denied access.
>>
>>
>> In the document
>> http://tapestry.apache.org/tapestry5.2-dev/guide/assets.html
>> under "Securing Assets" it is said that I can contribute in my AppModule
>> like this:
>>
>> public void contributeRegexAuthorizer(final Configuration<String>
>> configuration)
>> {
>> String pattern =
>> "([^/.]+/)*[^/.]+\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif))$";
>>
>> configuration.add("^org/resources/" + pattern);
>> }
>>
>>
>> I simply copied that from the docs but then my application won't start
>> anymore. The error message is:
>>
>>
>>
>> java.lang.IllegalArgumentException: Contribution
>> xxx.web.services.AppModule.contributeRegexAuthorizer(Configurati
>> on) (at AppModule.java:30) is for service 'RegexAuthorizer', which does
>> not exist.
>> at
>> org.apache.tapestry5.ioc.internal.RegistryImpl.validateContributeDefs(RegistryImpl.java:225)
>> at
>> org.apache.tapestry5.ioc.internal.RegistryImpl.<init>(RegistryImpl.java:201)
>> at
>> org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:170)
>> at
>> org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(TapestryAppInitializer.java:214)
>> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:95)
>> at
>> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>>
>>
>>
>>
>> Am I missing something or is the documentation outdated?
>>
>> Andy
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Can't contribute RegexAuthorizer / classpath assets not being
served [5.2.0]
Posted by Andy Pahne <an...@googlemail.com>.
So, I found out that the documentation is outdated.
There once was a RegeyAuthorizer that was part of tapestry-core
5-2-0-SNAPSHOT, as you can see here:
http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/internal/services/RegexAuthorizer.html
Checking the current source I find that there is no RegexAuthorizer
anymore, not in 5.2.0 and not in 5.2.1-SNAPSHOT.
The upgrade instructions also don't mention this.
I am still searching for a solution...
Andy
Am 26.08.2010 16:14, schrieb Andy Pahne:
>
> I am working with Tapestry 5.2.0. Some classpath assets are denied
> access.
>
>
> In the document
> http://tapestry.apache.org/tapestry5.2-dev/guide/assets.html
> under "Securing Assets" it is said that I can contribute in my
> AppModule like this:
>
> public void contributeRegexAuthorizer(final
> Configuration<String> configuration)
> {
> String pattern =
> "([^/.]+/)*[^/.]+\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif))$";
>
> configuration.add("^org/resources/" + pattern);
> }
>
>
> I simply copied that from the docs but then my application won't start
> anymore. The error message is:
>
>
>
> java.lang.IllegalArgumentException: Contribution
> xxx.web.services.AppModule.contributeRegexAuthorizer(Configurati
> on) (at AppModule.java:30) is for service 'RegexAuthorizer', which
> does not exist.
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.validateContributeDefs(RegistryImpl.java:225)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.<init>(RegistryImpl.java:201)
> at
> org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:170)
> at
> org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(TapestryAppInitializer.java:214)
> at
> org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:95)
> at
> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>
>
>
>
> Am I missing something or is the documentation outdated?
>
> Andy
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org