-
Notifications
You must be signed in to change notification settings - Fork 249
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
[batch/auth] Set accounts to "inactive" after extended inactivity #14789
base: main
Are you sure you want to change the base?
Conversation
…tive' table in case we want to avoid changing the users table schema.
I don't have the batch context to review this thoroughly, but I do have some high level questions:
|
auth/sql/estimated-current.sql
Outdated
DO | ||
UPDATE users | ||
SET users.state = 'inactive' | ||
WHERE (users.state = 'active') AND (users.last_active IS NOT NULL) AND (DATEDIFF(CURRENT_DATE(), users.last_active) > 60); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably make this invalidation timer be configurable, and default to off
@@ -1,7 +1,7 @@ | |||
CREATE TABLE `users` ( | |||
`id` INT(11) NOT NULL AUTO_INCREMENT, | |||
`state` VARCHAR(100) NOT NULL, | |||
-- creating, active, deleting, deleted | |||
-- creating, active, deleting, deleted, inactive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this in line with the migration you linked?
Responding to @patrick-schultz -
|
…n SQL; renamed last_active to last_activated; updated associated DB migration SQL.
Change Description
Addressing compliance requirement wherein Hail accounts must be disabled/marked as inactive after a certain number of days of inactivity. This is accomplished as follows (pending PR revisions):
last_active
column has been added to theusers
table, used for storing a given user's last active timestamp;last_active
timestamp is updated to the current date/time;last_active
timestamp is more than 60 days old.Security Assessment
Impact Description
This change entails a change to the
users
table schema and additional authorization-related checks thereof, but none of this is exposed to users and all happens internally.(Reviewers: please confirm the security impact before approving)