Results 1 to 4 of 4

Thread: Method Security in Spring Security 2.0.2

  1. #1
    Join Date
    Jun 2008
    Posts
    2

    Exclamation Method Security in Spring Security 2.0.2

    hi,
    I tried method security in Spring Security 2.0.2 Released but it doesn't work for for it's own sample! no one has a simple working sample? I'm really need it to continue my work

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    I tried method security in Spring Security 2.0.2 Released but it doesn't work for for it's own sample! no one has a simple working sample? I'm really need it to continue my work
    What doesn't work, post configuration, errors.... When doing so please use [ code][/code ] tags.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jun 2008
    Posts
    2

    Default

    hi, thanks very much for your attention.
    I tried this cofiguratio code of spring security release sample to see hove method security works , but it doesn't work!
    [code]
    <global-method-security secured-annotations="enabled">
    <protect-pointcut expression="execution(* bigbank.*BankService*.*(..))" access="ROLE_USER"/>
    </global-method-security>
    <http auto-config="true">
    <intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/>
    <intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" />
    <intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </http>
    <authentication-provider>
    <password-encoder hash="md5"/>
    <user-service>
    <user name="rod" password="a564de63c2d0da68cf47586ee05984d7" authorities="ROLE_SUPERVISOR, ROLE_USER, ROLE_TELLER" />
    <user name="dianne" password="65d15fe9156f9c4bbffd98085992a44e" authorities="ROLE_USER,ROLE_TELLER" />
    <user name="scott" password="2b58af6dddbd072ed27ffc86725d7d3a" authorities="ROLE_USER" />
    <user name="peter" password="22b5c9accc6e1ba628cedc63a72d57f8" authorities="ROLE_USER" />
    </user-service>
    </authentication-provider>
    </beans:beans>
    [/code>

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Well the first thing that looks weird to me is the fact that you enabled annotations but still use a pointcut. With annotations you shouldn't need a pointcut.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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