[英]Spring with BlazeDS Global Method Security not working
I am using BlazeDS and Spring Security and have set up my application using a Spring Security filter chain and Dispatcher Servlet in my web.xml and in my application-context.xml I have set up the following... I am using BlazeDS and Spring Security and have set up my application using a Spring Security filter chain and Dispatcher Servlet in my web.xml and in my application-context.xml I have set up the following...
<s:http
auto-config="true"
access-decision-manager-ref="accessDecisionManager"/>
<s:authentication-manager>
<s:authentication-provider
user-service-ref="userService"/>
</s:authentication-manager>
<f:message-broker>
<f:secured/>
</f:message-broker>
<s:global-method-security
access-decision-manager-ref="accessDecisionManager">
<s:protect-pointcut
expression="execution(* com.my.app.Server.*(..))"
access="ROLE_USER"/>
</s:global-method-security>
This generally works.这通常有效。 The Spring message broker correctly allows me to access my java Server class and the 'secured' tag works and allows me to log into the channel set using my custom authentication manager (via userService).
Spring 消息代理允许我正确访问我的 java 服务器 class 并且“安全”标签有效,并允许我使用我的自定义身份验证管理器登录到通道集(通过 userService)。 I can call remote methods on the Server class no problem.
我可以在服务器 class 上调用远程方法没有问题。
However, I cannot get the global method security to work at all.但是,我根本无法让全局方法安全性工作。 I cannot get Spring to invoke my accessDecisionManager, or even to deny access to methods on the Server class, no matter which access role I use.
无论我使用哪种访问角色,我都无法让 Spring 调用我的 accessDecisionManager,甚至拒绝访问服务器 class 上的方法。 Does anybody know how I can get this to work?
有人知道我怎样才能让它工作吗?
Incidentally, my Server class is not a Spring bean or anything like that, it is just a standard Java class as would be used in standard Flex remoting. Incidentally, my Server class is not a Spring bean or anything like that, it is just a standard Java class as would be used in standard Flex remoting. Would this make a difference?
这会有所作为吗?
I'm using Spring Security 3 and Flex 4.5我正在使用 Spring 安全 3 和 Flex 4.5
Point cuts and aspects only works for Spring beans, if it is plain java object spring cannot intercept any method calls as it is not proxied. Point cuts and aspects only works for Spring beans, if it is plain java object spring cannot intercept any method calls as it is not proxied. Please create a spring bean for your server class and it should be working fine.
请为您的服务器 class 创建一个 spring bean,它应该可以正常工作。
Once you created the spring bean you can expose the bean through blaze DS using flex:remoting-destination创建 spring bean 后,您可以使用 flex:remoting-destination 通过 blaze DS 公开 bean
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.