【发布时间】:2011-06-16 22:06:44
【问题描述】:
我收到以下消息,但我不知道它们是什么意思。一切似乎都正常运行,但我只想安全起见。对这些警告有什么可以做的:
2011-01-25/23:30:06.856/EST [http-80-exec-1] WARN Failed to create a session, as response has been committed. Unable to store SecurityContext.
2011-01-25/23:30:09.597/EST [http-80-exec-3] WARN Authentication event InteractiveAuthenticationSuccessEvent: email@domain.com; details: org.springframework.security.web.authentication.WebAuthenticationDetails@957e: RemoteIpAddress: 170.9.26.16; SessionId: null
我正在运行 spring 3 和 tomcat 6 和 spring security 3
更新
我根据此信息(来自 here)重新配置了以下 bean:
创建会话
控制创建 HTTP 会话的急切程度。如果未设置,则默认为“ifRequired”。其他选项是“总是”和“从不”。该属性的设置会影响 HttpSessionContextIntegrationFilter 的 allowSessionCreation 和 forceEagerSessionCreation 属性。除非此属性设置为“从不”,否则 allowSessionCreation 将始终为真。 forceEagerSessionCreation 为“false”,除非它设置为“always”。所以默认配置允许创建会话,但不强制。例外情况是,如果启用了并发会话控制,则当 forceEagerSessionCreation 设置为 true 时,无论此处的设置如何。然后在初始化 HttpSessionContextIntegrationFilter 期间使用“never”会导致异常。
<bean id="httpSessionContextIntegrationFilter" class="org.springframework.security.web.context.HttpSessionContextIntegrationFilter">
<property name="allowSessionCreation" value="false"/>
</bean>
【问题讨论】:
标签: java spring security tomcat