User password expiration
## Problem to solve The customers require the password expiration policy that makes user passwords expire after several days. The current GitLab only sets passwords to never expire. Product Issue: https://jihulab.com/jihulab/product/product/-/issues/24 ## Proposal ### 基础要求 * 设置密码过期由组织的管理员账户进行设置,可让用户密码在特定天数后过期,或设置密码永不过期。默认情况下,组织的密码设置为永不过期。 * 强制修改密码不得使用最近 **1** 次使用过的密码。(Confirmed with @QiangGuo ) * 使用用户最后一次更新密码为有效期起始时间。 * 天数为整数,按自然日计算。 ### 密码过期策略设置 * 在GitLab的“Setting > General” 中设置。 * 如果希望强制用户更改密码,可选择修改”启用密码过期策略“(“Enable the password expiration policy”)复选框状态,**默认为不勾选**。 * 不勾选为关闭功能,**过期时间** 和 **提前通知天数** 为只读。 ![disable](https://jihulab.com/jihulab/product/product/uploads/30931c6f160ac1e6e02743a4b1332ac3/disable.png) * 勾选为启用功能,**过期时间** 和 **提前通知天数** 变为可写。 ![Enable](https://jihulab.com/jihulab/product/product/uploads/897dfd54fd608537fdd8a780fc30920a/Enable.png) * 启用功能后,在 **过期时间(Expires in days)** 输入框内键入密码应采用的过期天数。暂定 14 ~ 400 天,默认值为90天。保存前进行检查。 * 启用功能后,在**提前通知天数(Set notice days before expires)**,键入通知用户其密码将过期的时间,暂定 1 ~ 30 天,默认值为7天。 **提前通知天数** 不应大于 **过期时间**(提前同时天数 ≦ 过期时间),保存前进行检查。 * 修改完成后,点击保存即生效。 ### 通知 * 使用邮件通知,说明过期时间,给出修改链接。 * ~~在代办事项中展示修改密码任务,点击进入修改密码页面。~~ 待定 ### 其他情况说明 * 如用户在密码过期后登陆系统,则在用户登陆成功后,强制跳转密码修改界面,进行密码修改。 ### User Stories #### Case 1 Pasted from https://gitlab.com/gitlab-org/gitlab/-/issues/16555#note_1071847216 JiHu team is also facing the increasing customer requirements of this feature, so we would like to contribute and discuss our proposal here: 1. In **Admin > Settings > General >** ~~**Sign-up restrictions**~~ **Account and Restrictions** , add **Password expiration time** below ~~password complexity check-boxes~~ Maximum allowed lifetime for SSH keys (Or should this be in Sign-in restrictions? but it would be easier for user to set password length/complexity/expiration if we put them together) ![image](https://gitlab.com/gitlab-org/gitlab/uploads/764662154be071b1321557d4ad5814e8/image.png) 1. User can enter numbers of days for expiration time, and choose **Save changes** 1. Then before the user's password expires, system should send daily emails to remind user to reset his password. 1. If the user doesn't reset the password and password expires, system will force the user page redirecting to "Change password" page. ![image](https://gitlab.com/gitlab-org/gitlab/uploads/dad19397d72d717c1bc6355d345b093e/image.png)
epic
关于极狐(GitLab)
违法和不良信息举报中心 京公网安备11010502047940号 京ICP备2021036779号-1