【发布时间】:2018-07-08 15:21:52
【问题描述】:
我们有一个具有多个过滤器链配置的正常运行的应用程序。第一个过滤器链属于不需要身份验证的 REST POST 请求:
...
<http pattern="/*.info**" entry-point-ref="infoEntryPoint" use-expressions="true" create-session="never">
<intercept-url pattern="/*.info" access="permitAll" />
</http>
<beans:bean id="infoEntryPoint" class="org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint">
<beans:property name="realmName" value="Info REST Realm" />
</beans:bean>...
它适用于 GET 和 POST 请求,但升级到 Spring Security 4 后,该过滤器链不会捕获 POST 请求,但下一个过滤器链会捕获它们(并创建会话并抛出 403,做正确的工作) .
我该如何解决?
【问题讨论】:
标签: rest spring-security csrf csrf-protection