Allow security AuditListener overrides

Introduce `AbstractAuthenticationAuditListener` and
`AbstractAuthorizationAuditListener` classes so that users can
extended them to replace the auto-configured defaults.

Closes gh-4406
This commit is contained in:
Vedran Pavic
2015-11-05 21:17:55 +01:00
committed by Phillip Webb
parent 564cbfe96c
commit a0c696b17b
9 changed files with 165 additions and 26 deletions

View File

@@ -1324,7 +1324,9 @@ channel and any subscribers you need).
Spring Boot Actuator has a flexible audit framework that will publish events once Spring
Security is in play ('`authentication success`', '`failure`' and '`access denied`'
exceptions by default). This can be very useful for reporting, and also to implement a
lock-out policy based on authentication failures.
lock-out policy based on authentication failures. To customize published security events
you can provide your own implementations of `AbstractAuthenticationAuditListener` and
`AbstractAuthorizationAuditListener`.
You can also choose to use the audit services for your own business events. To do that
you can either inject the existing `AuditEventRepository` into your own components and