Announcement Announcement Module
Collapse
No announcement yet.
AOP & Method level security not workign together Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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 ="org.springframework.security.intercept.method.ao palliance.MethodSecurityInterceptor">
    <property name="authenticationManager" ref="authenticationManager"/>
    <property name="accessDecisionManager" ref ="accessDecisionManager"/>
    <property name="objectDefinitionSource">
    <value>
    com.patni.mfg.tsg.springapp.service.ProductManager ServiceImpl.deleteProduct=PRODUCT MANAGER
    com.patni.mfg.tsg.springapp.service.UserManagerSer viceImpl.deleteUser=ADMINISTRATOR
    </value>
    </property>
    </bean>

    ( logging aspect)

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