-
Sep 15th, 2008, 11:55 PM
#1
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">
<aop
ointcut id="aopLogging"
expression="within(com.patni.mfg.tsg.springapp.ser vice..*)"/>
<aop:before pointcut-ref="aopLogging" method="log"/>
</aop:aspect>
</aop:config>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules