You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Eduard Neuwirt <ed...@googlemail.com> on 2011/04/30 10:55:44 UTC

Anonymous access configuration for ShiroFilterFactoryBean

Hello,

I am trying to configure the anonymous access to my sources (I am using
spring):

This seems to be incorrect.

I have the follwing declaration in web.xml:
<servlet-mapping>
    <servlet-name>Spring Application Servlet</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>

and try to allow for everybody the access to the url:

<bean id="shiroFilter"
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
    <property name="securityManager" ref="securityManager" />
    <property name="filterChainDefinitions">
      <value>
        /** = anon
        </value>
    </property>
  </bean>

What I am doing wrong ?--
View this message in context: http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6319168.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Anonymous access configuration for ShiroFilterFactoryBean

Posted by Les Hazlewood <lh...@apache.org>.
In your first email, you didn't show a <filter> or <filter-mapping>
elements in web.xml

Once you add those two in web.xml, it works.

Cheers,

Les

On Mon, May 2, 2011 at 1:58 PM, Eduard Neuwirt
<ed...@googlemail.com> wrote:
> Thanks,
>
> I was simple not sure, that the config below is correct. Misterious
> error disappeared, after I had used this configuration.
>
> Eduard
>
> Am 02.05.2011 21:55, schrieb Jared Bunting [via Shiro User]:
>> What sort of error are you getting?  What is happening?  The config
>> looks correct to me, but without more details, I have no idea what sort
>> of problem you're running into.
>>
>> On 05/02/2011 02:42 PM, Eduard Neuwirt wrote:
>>
>> > I hope this is correct config, isn't ?
>> >
>> >
>> > <filter>
>> > <filter-name>shiroFilter</filter-name>
>> >
>> >
>> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
>> > <init-param>
>> > <param-name>targetFilterLifecycle</param-name>
>> > <param-value>true</param-value>
>> > </init-param>
>> > </filter>
>> >
>> >
>> >
>> >
>> > <filter-mapping>
>> > <filter-name>shiroFilter</filter-name>
>> > <url-pattern>/*</url-pattern>
>> > </filter-mapping>
>> >
>> > <bean id="shiroFilter"
>> > class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
>> > <property name="securityManager" ref="securityManager" />
>> > <property name="filterChainDefinitions">
>> > <value>
>> >         /** = anon
>> > </value>
>> > </property>
>> > </bean>
>> >
>> >
>> > --
>> > View this message in context:
>> http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325058.html
>> <http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325058.html?by-user=t>
>> > Sent from the Shiro User mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------------------------------------------------
>> If you reply to this email, your message will be added to the
>> discussion below:
>> http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325106.html
>>
>> To unsubscribe from Anonymous access configuration for
>> ShiroFilterFactoryBean, click here
>> <http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6319168&code=ZWR1YXJkLm5ldXdpcnRAZ29vZ2xlbWFpbC5jb218NjMxOTE2OHwtNjU1OTU2ODcw>.
>>
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325268.html
> Sent from the Shiro User mailing list archive at Nabble.com.

Re: Anonymous access configuration for ShiroFilterFactoryBean

Posted by Eduard Neuwirt <ed...@googlemail.com>.
Thanks,

I was simple not sure, that the config below is correct. Misterious 
error disappeared, after I had used this configuration.

Eduard

Am 02.05.2011 21:55, schrieb Jared Bunting [via Shiro User]:
> What sort of error are you getting?  What is happening?  The config
> looks correct to me, but without more details, I have no idea what sort
> of problem you're running into.
>
> On 05/02/2011 02:42 PM, Eduard Neuwirt wrote:
>
> > I hope this is correct config, isn't ?
> >
> >
> > <filter>
> > <filter-name>shiroFilter</filter-name>
> >
> > 
> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
> > <init-param>
> > <param-name>targetFilterLifecycle</param-name>
> > <param-value>true</param-value>
> > </init-param>
> > </filter>
> >
> >
> >
> >
> > <filter-mapping>
> > <filter-name>shiroFilter</filter-name>
> > <url-pattern>/*</url-pattern>
> > </filter-mapping>
> >
> > <bean id="shiroFilter"
> > class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
> > <property name="securityManager" ref="securityManager" />
> > <property name="filterChainDefinitions">
> > <value>
> >         /** = anon
> > </value>
> > </property>
> > </bean>
> >
> >
> > --
> > View this message in context: 
> http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325058.html 
> <http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325058.html?by-user=t>
> > Sent from the Shiro User mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325106.html 
>
> To unsubscribe from Anonymous access configuration for 
> ShiroFilterFactoryBean, click here 
> <http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6319168&code=ZWR1YXJkLm5ldXdpcnRAZ29vZ2xlbWFpbC5jb218NjMxOTE2OHwtNjU1OTU2ODcw>. 
>



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325268.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Anonymous access configuration for ShiroFilterFactoryBean

Posted by Jared Bunting <ja...@digitalreasoning.com>.
What sort of error are you getting?  What is happening?  The config
looks correct to me, but without more details, I have no idea what sort
of problem you're running into.

On 05/02/2011 02:42 PM, Eduard Neuwirt wrote:
> I hope this is correct config, isn't ?
>
>
>   <filter>
>     <filter-name>shiroFilter</filter-name>
>    
> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
>     <init-param>
>       <param-name>targetFilterLifecycle</param-name>
>       <param-value>true</param-value>
>     </init-param>
>   </filter>
>
>   
>   
>   
>   <filter-mapping>
>     <filter-name>shiroFilter</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>
>
> <bean id="shiroFilter"
> class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
>     <property name="securityManager" ref="securityManager" />
>     <property name="filterChainDefinitions">
>       <value>
>         /** = anon
>         </value>
>     </property>
>   </bean>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325058.html
> Sent from the Shiro User mailing list archive at Nabble.com.


Re: Anonymous access configuration for ShiroFilterFactoryBean

Posted by Eduard Neuwirt <ed...@googlemail.com>.
I hope this is correct config, isn't ?


  <filter>
    <filter-name>shiroFilter</filter-name>
   
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    <init-param>
      <param-name>targetFilterLifecycle</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>

  
  
  
  <filter-mapping>
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

<bean id="shiroFilter"
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
    <property name="securityManager" ref="securityManager" />
    <property name="filterChainDefinitions">
      <value>
        /** = anon
        </value>
    </property>
  </bean>


--
View this message in context: http://shiro-user.582556.n2.nabble.com/Anonymous-access-configuration-for-ShiroFilterFactoryBean-tp6319168p6325058.html
Sent from the Shiro User mailing list archive at Nabble.com.