Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish an AuditEvent on logout #1836

Closed
mdeinum opened this issue Nov 6, 2014 · 9 comments
Closed

Publish an AuditEvent on logout #1836

mdeinum opened this issue Nov 6, 2014 · 9 comments
Assignees
Labels
status: superseded An issue that has been superseded by another

Comments

@mdeinum
Copy link
Contributor

mdeinum commented Nov 6, 2014

Currently the actuator does a good job on sending AuditEvents on login (ok/failure) authentication etc. would be nice if that could also be done for a logout. This can probably be implemented with a LogoutHandler which gets invoked in the logout chain or another ApplicationListener that listens for SessionDestroyedEvents.

Would be especially nice if a difference could be made between a regular logoff or a session timeout.

Might be related to SEC-2680.

@mdeinum
Copy link
Contributor Author

mdeinum commented Nov 6, 2014

After reconsideration this might not be a addition for Spring Boot, it uses by default basic authentication for which logout will not work.

@philwebb philwebb added the type: enhancement A general enhancement label Nov 6, 2014
@dsyer
Copy link
Member

dsyer commented Nov 12, 2014

Logout works if there is a session (which would be the normal way of using Spring Boot with a UI). Also, I do not think this is a Boot issue. If SEC-2680 is resolved we'd pick up the events with no changes.

@mdeinum
Copy link
Contributor Author

mdeinum commented Nov 13, 2014

If a logout event is issued you might need to add a new auditevent so that it can be logged properly. Now only AUTHENTICATION_SUCCESS, AUTHENTICATION_SWITCH and AUTHENTICATION_FAILURE are logged. I can image that a AUTHENTICATION_LOGOUT or something alike might be added.

But agreed that is just a minor enhancement and relies upon the solution provided by SEC-2680.

@ptahchiev
Copy link
Contributor

+1 for this

@philwebb
Copy link
Member

I think we should leave this to the Spring Security fix suggested in SEC-2680

@philwebb philwebb removed the type: enhancement A general enhancement label May 13, 2016
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
There is no such class `ReplyQosSettings`.

Closes spring-projectsgh-1836
@philwebb philwebb reopened this Jun 28, 2024
@philwebb philwebb added this to the 3.4.x milestone Jun 28, 2024
@philwebb philwebb added type: enhancement A general enhancement status: ideal-for-contribution An issue that a contributor can help us with labels Jun 28, 2024
@Chu3laMan
Copy link
Contributor

can I make a try out on this?

@philwebb
Copy link
Member

Please do @Chu3laMan. You'll probably want to take a look at AuthenticationAuditListener and add something to onApplicationEvent that deals with org.springframework.security.authentication.event.LogoutSuccessEvent. There are existing tests in AuthenticationAuditListenerTests that might also help.

@Chu3laMan
Copy link
Contributor

Chu3laMan commented Jun 30, 2024

@philwebb It's already done, don't we need to take care about handling errors during logout phase inside the same method?

@philwebb
Copy link
Member

philwebb commented Jul 5, 2024

Closing in favor of PR #41278. Thanks @Chu3laMan

@philwebb philwebb closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
@philwebb philwebb added status: superseded An issue that has been superseded by another and removed type: enhancement A general enhancement status: ideal-for-contribution An issue that a contributor can help us with labels Jul 5, 2024
@snicoll snicoll removed this from the 3.4.x milestone Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

6 participants