我们的应用程序配置了blazeds和spring-security,并使用远程对象标记来调用方法。我有一种感觉,这个配置不合适。有什么参考资料可以让我理解这三种技术的集成吗?
我实际面临的问题是一旦登录后,在浏览器工具(Chrome的inspect元素)中看到的session id不会改变,其中spring-security表示一旦用户经过身份验证,session id就会改变。
<flex:message-broker>
<flex:remoting-service default-channels="my-cfamf-secure" />
<flex:secured>
<flex:secured-channel channel="my-cfamf-secure"
access="ROLE_USER,ROLE_ADMIN,ROLE_SALES" />
<flex:secured-endpoint-path pattern="**/messagebroker/**" access="ROLE_USER" />
</flex:secured>
</flex:message-broker>`
<security:http auto-config="true">
<security:intercept-url pattern="/index.jsp"
filters="none" access="ROLE_USER" />
<security:intercept-url pattern="/**/*.swf"
filters="none" />
<security:intercept-url pattern="/**/*.jsp"
filters="none" access="ROLE_USER" />
<security:intercept-url pattern="/**" filters="none" />
<security:logout invalidate-session="true"
logout-success-url="/index.jsp" />
<security:session-management session-fixation-protection="newSession">
</security:session-management>
</security:http>
<security:authentication-manager alias="_authenticationManager">
<security:authentication-provider
user-service-ref="userDetailsService">
<security:password-encoder hash="md5" />
</security:authentication-provider>
</security:authentication-manager>
<channel-definition id="my-cfamf-secure"
class="mx.messaging.channels.SecureAMFChannel">
<endpoint
url="https://{server.name}:{server.port}/{context.root}/messagebroker/amf/cfamfsecure"
class="flex.messaging.endpoints.SecureAMFEndpoint" />
<properties>
<polling-enabled>false</polling-enabled>
<serialization>
<instantiate-types>true</instantiate-types>
</serialization>
<add-no-cache-headers>false</add-no-cache-headers>
<invalidate-session-on-disconnect>true</invalidate-session-on-disconnect>
</properties>
</channel-definition>
我的配置
看来您使用的是非常旧的Spring Security版本(版本2.x),请考虑升级到3.x。使用这种基本配置应该很容易,如果继续使用旧的配置,就不容易获得支持。
一个提示:你的配置内<security:http>
分配filters="none"
到所有可能的url,所以我猜它实际上不会做任何任何请求,这就是为什么你的会话管理设置被忽略。