Repository navigation
Audit: ACCOUNT_LOCKED and SESSION_REVOKED events - #52
Open
touchfalls wants to merge 1 commit into
Open
touchfalls wants to merge 1 commit into
touchfalls wants to merge 1 commit into
Conversation
…ILURE The failure that locks an account (password or 2FA code) now writes ACCOUNT_LOCKED, and /sessions revoke writes SESSION_REVOKED. LOGIN_FAILURE was never written and duplicated login_attempts, which already stores every failure with its reason.
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.
Closes the audit item in ROADMAP.md.
ACCOUNT_LOCKED. Whether it locks is predicted from the account read before the check (Account.nextFailureLocks, same rule as the SQL inincrementFailedAttemptsAtomic). Checks for one player run one at a time, so only two players typing the same name at once could miss or double the event; marked as a shortcut in the code./sessions revokewritesSESSION_REVOKED(newAuthService.revokeSavedSessions). A failed audit write does not report the command as failed, because the sessions are already gone.LOGIN_FAILUREremoved: it was never written, andlogin_attemptsalready holds every failure with its reason. Stored rows are read as strings, so nothing breaks on old databases.ADMIN_ACTIONwas already written on account deletion; the roadmap was out of date.Tests:
AccountLockStateTest,LoginServiceSecurityTest,AuthServiceSecurityTest;./gradlew testpasses locally.