Add audit reauthentication as its own event and improve diagnostics - #7929
Open
labkey-bpatel wants to merge 2 commits into
Open
Add audit reauthentication as its own event and improve diagnostics#7929labkey-bpatel wants to merge 2 commits into
labkey-bpatel wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Nothing recorded that a reauthentication happened. SSO reauth wrote no audit event at all, and local reauth wrote a "logged in" event, which misstates what happened — no session is created and the user was already signed in. On the failure side, every distinct reauthentication failure produced the same "wrong user reauthenticated" message, with nothing in the server log at all, so an administrator hunts for a user mismatch that usually never happened.
Related Pull Requests
Changes
REAUTHENTICATEDuser audit event andauditReauthSuccess(), recorded from each path that completes a reauthentication.finalizePrimaryAuthentication()takes areauthflag that suppresses the "logged in" event which previously misstated what happened.setReauthUser()keeps its existing name,voidreturn, and signature.UserManager.getAuthCount()counts audit events matching "logged in", so suppressing that event means reauthentication no longer inflates it.LastLoginis unchanged by this PR and still updated on reauthentication, so therecentUserCountusage metric and the LastLogin column in the Users grid still count it as recent activity.