[Feature Request]: support alter user <user name> lock statement.
Is there an existing issue for the same feature request?
- [x] I have checked the existing issues.
Is your feature request related to a problem?
MO has already supported " alter user <user name> unlock " statement to enable an user. However lock user is not supported yet.
In MOI implementation, when customer created an user in a workspace, we create an MO user accordingly, it means we need to support lock/unlock a MO user in order to support MOI user management features.
Describe the feature you'd like
MO support "alter user
Describe implementation you've considered
No response
Documentation, Adoption, Use Case, Migration Strategy
Additional information
No response
当前的MO是有类似lock的机制的。 它是当有设置最大密码错误次数的时候 以及 最大 连接延迟的情况下 这2个: set global connection_control_failed_connections_threshold = 3; set global connection_control_max_connection_delay = 300000000; (bvt case参考:password_retry.sql)
那么当登录密码次数大于一定数量。会锁住用户 connection_control_max_connection_delay 这么长时间。 在登录的时候自动处理,没有相应语法。 (对应源码: pkg/frontend/session.go AuthenticateUser函数 约1436行)
刚才和 @ouyuanning 进行了讨论,最后的结论是不复用当前的密码管理的lock 机制,而是增加一个全新的用户是否被锁定的状态来实现。
工作安排优先级排后,下一个版本编写测试用例及测试