Roles filter

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Roles filter

Tamás Cservenák
Hi there,

I'm trying to set up a RolesAuthorizationFilter, unsuccesfully.

A quick question regarding the code in SVN trunk:

When you apply the [url] section from servlet filter config, for
example the line:

  /service/** = authcBasic,roles[admin]

according to code, it gets applied as String[] in PathMatchingFilter
(the parent of RolesAuthzFilter), on line 53.

BUT, the RolesAuthorizationFilter on line 42 tries to cast it to
Set<String> and throws ClassCastException...

Am i missing something here? Is this a bug or i did oversee something?

--
Thanks,
~t~
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Roles filter

Les Hazlewood
Administrator
I'll look into it now.  I don't remember touching any of that in quite a
while - it should work.  I'll letcha know when I find something....

Cheers,

Les

On Tue, Jul 29, 2008 at 9:12 AM, Tamás Cservenák <[hidden email]>wrote:

> Hi there,
>
> I'm trying to set up a RolesAuthorizationFilter, unsuccesfully.
>
> A quick question regarding the code in SVN trunk:
>
> When you apply the [url] section from servlet filter config, for
> example the line:
>
>  /service/** = authcBasic,roles[admin]
>
> according to code, it gets applied as String[] in PathMatchingFilter
> (the parent of RolesAuthzFilter), on line 53.
>
> BUT, the RolesAuthorizationFilter on line 42 tries to cast it to
> Set<String> and throws ClassCastException...
>
> Am i missing something here? Is this a bug or i did oversee something?
>
> --
> Thanks,
> ~t~
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Roles filter

Les Hazlewood
Administrator
Hi Tamás,

You're absolutely correct - it shouldn't have been casting to a Set.

I've committed the fix - your CI server should already be building the new
.jar ;)

Thanks for reporting it!

Cheers,

Les

On Tue, Jul 29, 2008 at 9:30 AM, Les Hazlewood <[hidden email]> wrote:

> I'll look into it now.  I don't remember touching any of that in quite a
> while - it should work.  I'll letcha know when I find something....
>
> Cheers,
>
> Les
>
>
> On Tue, Jul 29, 2008 at 9:12 AM, Tamás Cservenák <[hidden email]>wrote:
>
>> Hi there,
>>
>> I'm trying to set up a RolesAuthorizationFilter, unsuccesfully.
>>
>> A quick question regarding the code in SVN trunk:
>>
>> When you apply the [url] section from servlet filter config, for
>> example the line:
>>
>>  /service/** = authcBasic,roles[admin]
>>
>> according to code, it gets applied as String[] in PathMatchingFilter
>> (the parent of RolesAuthzFilter), on line 53.
>>
>> BUT, the RolesAuthorizationFilter on line 42 tries to cast it to
>> Set<String> and throws ClassCastException...
>>
>> Am i missing something here? Is this a bug or i did oversee something?
>>
>> --
>> Thanks,
>> ~t~
>>
>
>
Loading...