我们已经在JBoss EPA 6.4.17群集中成功配置了SSO。
每个用户会话都配置了1分钟的 maxInactiveInterval 。 因此,客户端将每隔30秒继续向服务器发送一个活动请求,以使会话保持活动状态。 我已经验证了Jboss缓存中的会话在手动注销时被清除。类似地,关闭选项卡和关闭浏览器操作得到妥善处理。
如果我终止浏览器进程或终止与服务器的客户端连接,则应在1分钟后从服务器销毁缓存。 因为会话的maxInactiveInterval是1分钟。但它没有按预期被破坏。
关于调试。我找到了以下
在这个sessionEvent()方法中(下面是Jboss源代码),
// Was the session destroyed as the result of a timeout or
// the undeployment of the containing webapp?
// If so, we'll just remove the expired session from the
// SSO. If the session was logged out, we'll log out
// of all sessions associated with the SSO.
boolean timedOut;
boolean stopped = false;
if ((timedOut = isSessionTimedOut(session)) || (stopped = isManagerStopped(session))) {
WebLogger.WEB_SSO_LOGGER.tracef("remove session %s from SSO %s, isSessionTimedOut=%s, isManagerStopped=%s", session, ssoId, timedOut, stopped);
removeSession(ssoId, session);
// Quite poor. We hijack the caller thread (the Tomcat background thread)
// to do our cleanup of expired sessions
processExpires();
} else {
WebLogger.WEB_SSO_LOGGER.tracef("user logged out of SSO %s", ssoId);
// The session was logged out.
logout(ssoId);
}
控制在会话超时中转到IF块并在手动注销时转到ELSE块。
这是一个安全问题。在终止客户端浏览器之后,我可以使用像ajax请求这样的curl请求访问服务器。
这是一个存在的问题吗?或者Jboss中的任何修复程序?