AuditEvent AUTHORIZATION_SUCCESS 未在 OAuth2 资源服务器中触发

AuditEvent AUTHORIZATION_SUCCESS not fired in OAuth2 Resource Server

根据 this 文章和网络上的许多其他文章,Spring Boot Actuator 通过使用 Actuator 端点 /auditevents 并通过监听为安全审计提供开箱即用的支持AuditApplicationEvents.

我正在使用 Spring Security v5.1.1 和 OAuth2 资源服务器测试 Spring Boot v2.1.0.RC1 以验证 JWT 和用户身份验证,请参阅 Github ismarslomic/spring-security-resourceserver-example 处的代码。

authentication/authorization 部分按预期工作,使用 Google 作为 IDP。但是,AUTHORIZATION_SUCCESS 事件永远不会从 Spring 引导执行器触发。当我在 Authorization header 中放弃添加 JWT 时,LoginAttemptsLogger 触发并捕获的唯一事件是 AUTHORIZATION_FAILURE

我有什么遗漏吗?

这显示为 Spring 安全性中的错误,已在版本 5.1.25.0.10 中解决。在 https://github.com/spring-projects/spring-boot/issues/14921

查看更多信息