Results 1 to 9 of 9

Thread: why not match such URI ?

  1. #1

    Default why not match such URI ?

    why not match such URI ?


    [DEBUG] [2005-02-24 14:14:31,345] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Converted URL to lowercase, from: '/xfile/menu.jsp'; to: '/xfile/menu.jsp'
    [DEBUG] [2005-02-24 14:14:31,345] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Converted URL to lowercase, from: '/xfile/menu.jsp'; to: '/xfile/menu.jsp'
    [DEBUG] [2005-02-24 14:14:31,345] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Candidate is: '/xfile/menu.jsp'; pattern is /xfile/menu.jsp ; matched=false
    [DEBUG] [2005-02-24 14:14:31,345] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Candidate is: '/xfile/menu.jsp'; pattern is /xfile/menu.jsp ; matched=false
    [DEBUG] [2005-02-24 14:14:31,345] net.sf.acegisecurity.intercept.AbstractSecurityInt erceptor - Public object - authentication not attempted
    [DEBUG] [2005-02-24 14:14:31,345] net.sf.acegisecurity.intercept.AbstractSecurityInt erceptor - Public object - authentication not attempted
    [DEBUG] [2005-02-24 14:14:31,355] net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter - Chain processed normally
    [DEBUG] [2005-02-24 14:14:31,355] net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter - Chain processed normally




    ===============================

    <bean id="filterInvocationInterceptor" class="net.sf.acegisecurity.intercept.web.FilterSe curityInterceptor">
    <property name="authenticationManager"><ref bean="authenticationManager"/></property>
    <property name="accessDecisionManager"><ref local="httpRequestAccessDecisionManager"/></property>
    <property name="objectDefinitionSource">
    <value>
    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    \A/secure/super.*\Z=ROLE_WE_DONT_HAVE
    \A/secure/.*\Z=ROLE_SUPERVISOR,ROLE_USER
    \A/xfile/.*\Z = ROLE_USER
    </value>
    </property>
    </bean>

  2. #2

    Default

    [DEBUG] [2005-02-24 14:44:00,569] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Converted URL to lowercase, from: '/xfile/menu.jsp'; to: '/xfile/menu.jsp'
    [DEBUG] [2005-02-24 14:44:00,569] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Converted URL to lowercase, from: '/xfile/menu.jsp'; to: '/xfile/menu.jsp'
    [DEBUG] [2005-02-24 14:44:00,579] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Candidate is: '/xfile/menu.jsp'; pattern is \A/xfile/*.\Z ; matched=false
    [DEBUG] [2005-02-24 14:44:00,579] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Candidate is: '/xfile/menu.jsp'; pattern is \A/xfile/*.\Z ; matched=false
    [DEBUG] [2005-02-24 14:44:00,579] net.sf.acegisecurity.intercept.AbstractSecurityInt erceptor - Public object - authentication not attempted
    [DEBUG] [2005-02-24 14:44:00,579] net.sf.acegisecurity.intercept.AbstractSecurityInt erceptor - Public object - authentication not attempted
    [DEBUG] [2005-02-24 14:44:01,991] net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter - Chain processed normally
    [DEBUG] [2005-02-24 14:44:01,991] net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter - Chain processed normally

  3. #3

    Default

    can't visit

    [DEBUG] [2005-02-24 15:06:48,577] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Converted URL to lowercase, from: '/xfile/menu.jsp'; to: '/xfile/menu.jsp'
    [DEBUG] [2005-02-24 15:06:48,577] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Converted URL to lowercase, from: '/xfile/menu.jsp'; to: '/xfile/menu.jsp'
    [DEBUG] [2005-02-24 15:06:48,577] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Candidate is: '/xfile/menu.jsp'; pattern is \A/xfile/.*\Z ; matched=false
    [DEBUG] [2005-02-24 15:06:48,577] net.sf.acegisecurity.intercept.web.RegExpBasedFilt erInvocationDefinitionMap - Candidate is: '/xfile/menu.jsp'; pattern is \A/xfile/.*\Z ; matched=false
    [DEBUG] [2005-02-24 15:06:48,587] net.sf.acegisecurity.intercept.AbstractSecurityInt erceptor - Public object - authentication not attempted
    [DEBUG] [2005-02-24 15:06:48,587] net.sf.acegisecurity.intercept.AbstractSecurityInt erceptor - Public object - authentication not attempted
    [DEBUG] [2005-02-24 15:06:48,857] net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter - Chain processed normally
    [DEBUG] [2005-02-24 15:06:48,857] net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter - Chain processed normally

    ======================================

    <bean id="filterInvocationInterceptor" class="net.sf.acegisecurity.intercept.web.FilterSe curityInterceptor">
    <property name="authenticationManager">
    <ref bean="authenticationManager" />
    </property>

    <property name="accessDecisionManager">
    <ref local="httpRequestAccessDecisionManager" />
    </property>

    <property name="objectDefinitionSource">
    <value>
    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    \A/xfile/.*\Z = ROLE_USER
    </value>
    </property>
    </bean>

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Just a hunch.... Try removing the spaces before and after the equals sign in your objectDefinitionSource property. Please let me know if that works.

  5. #5

    Default

    I've removed the spaces . it still can't work.

  6. #6

    Default

    set

    \A/xfile/*.*\Z = ROLE_USER

    it works now.

    but, what's the matter with

    \A/xfile/*\Z = ROLE_USER

  7. #7
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    I'd encourage you to use Ant Paths, as they're far more forgiving and apparent as to what they mean. See http://acegisecurity.sourceforge.net...lterinvocation.

  8. #8

    Default

    ant path?

    what 'e mean, please?

  9. #9
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    As shown in the reference guide, you can use either Regular Expressions OR Ant Paths to express your URIs. The benefit of Ant Paths is they're a lot simpler and clearer. Here's an example mapping:

    Code:
    <bean id="filterInvocationInterceptor" class="net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor">
      <property name="authenticationManager"><ref bean="authenticationManager"/></property>
      <property name="accessDecisionManager"><ref bean="accessDecisionManager"/></property>
      <property name="runAsManager"><ref bean="runAsManager"/></property>
      <property name="objectDefinitionSource">
        <value>
          CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
          PATTERN_TYPE_APACHE_ANT
          /secure/super/**=ROLE_WE_DONT_HAVE
          /secure/**=ROLE_SUPERVISOR,ROLE_TELLER
        </value>
      </property>
    </bean>

Similar Threads

  1. Replies: 12
    Last Post: Oct 30th, 2010, 12:26 AM
  2. FilterSecurityInterceptor can't match URL parameters
    By mattlangston in forum Security
    Replies: 3
    Last Post: Jul 31st, 2007, 02:16 PM
  3. Replies: 2
    Last Post: Sep 8th, 2005, 02:47 PM
  4. Replies: 3
    Last Post: Aug 30th, 2004, 09:56 AM
  5. how to match to method name
    By pinglu in forum AOP
    Replies: 1
    Last Post: Aug 16th, 2004, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •