此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring Security 6.3.1

此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring Security 6.3.1

Spring Security 5.8 提供了许多新功能。 以下是该版本的亮点。

核心

会话处理改进

  • GH-6125 - 改进了会话创建和访问

  • gh-11392 - 支持延迟查找SecurityContext

AuthorizationManager API

  • gh-11493 - 支持 SpELAuthorizationManager

  • AuthorizationManager

  • gh-11393 - 对AuthorizationManager

  • “AuthorizationManager”的其他 XML 支持

  • GH-11304 - 支持AuthorizationManagerRoleHierarchy

  • gh-11076 - 支持 WebSocketsAuthorizationManager

  • gh-11326 - 支持 AspectJAuthorizationManager

  • GH-4841GH-9401 - 支持方法安全性ReactiveAuthorizationManager

  • gh-11625 - 支持组合AuthorizationManager

杂项

  • GH-10973 - 可以发布为SecurityContextHolderStrategy@Bean

配置

  • GH-11771 - 应该支持方法HttpSecurityDslapply

OAuth

  • gh-11590 - 弃用资源所有者密码授予

  • gh-11383 - 将 、 和 添加到baseSchemebaseHostbasePortbasePathpost_logout_redirect_uri

  • gh-11661 - 添加OpaqueTokenAuthenticationConverter

  • GH-11232 - 定义 30 秒连接和读取超时ClientRegistrations#rest

  • gh-11638 - 发生未知 KID 错误时刷新远程 JWK

SAML的

  • gh-11286 - 支持配置多个信赖方注销绑定

  • gh-11065 - 允许 AuthnRequests 的自定义中继状态

  • gh-11468 - 简化访问AuthnRequest#id

Web

  • gh-11073 - 添加DelegatingServerHttpHeadersWriter

  • gh-4001 - 添加对 CSRF BREACH 保护的 servlet 支持

  • gh-11959 - 添加对 CSRF BREACH 保护的反应式支持

  • gh-11464 - Remember Me 支持 SHA256 算法

  • gh-11908 - 在 ServerHttpSecurity 中使 X-Xss-Protection 标头值可配置

  • gh-11347 - 简化 Java 配置用法RequestMatcher

  • gh-9159 - 在securityMatcherrequestMatcherHttpSecurity

  • gh-11952 - 添加到csrfTokenRequestResolverCsrfDsl

  • GH-11916 - 捡起豆子HttpSecurityConfigurationContentNegotiationStrategy

  • gh-11971 - 对运行所有调度程序类型的额外支持AuthorizationFilter

测试

  • GH-6899 - 用作元注释@WithMockUser