Announcement Announcement Module
No announcement yet.
AOP & Method level security not workign together Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AOP & Method level security not workign together

    We are using AOP to log the entry & exit of methods called in some of our packages. We have declared method level security in some of the methods in these packages using MethodSecurityInterceptor.

    What is found is that the both are not working together. In our case the log is coming but the security is not working. Removing the logging aspect for this package makes the security working ! Any clue why this happens or what is the workaround ?

    Code snippets : (method level security )

    <bean id="securityInterceptor"
    class =" palliance.MethodSecurityInterceptor">
    <property name="authenticationManager" ref="authenticationManager"/>
    <property name="accessDecisionManager" ref ="accessDecisionManager"/>
    <property name="objectDefinitionSource">
    com.patni.mfg.tsg.springapp.service.ProductManager ServiceImpl.deleteProduct=PRODUCT MANAGER
    com.patni.mfg.tsg.springapp.service.UserManagerSer viceImpl.deleteUser=ADMINISTRATOR

    ( logging aspect)

    <bean id="LoggingAspect" class="com.patni.mfg.tsg.springapp.aop.LoggingAspe ct"/>
    <aop:aspect ref="LoggingAspect">
    <aopointcut id="aopLogging"
    expression="within(com.patni.mfg.tsg.springapp.ser vice..*)"/>
    <aop:before pointcut-ref="aopLogging" method="log"/>