Add password complexity to application settings on backend
requested to merge gitlab-jh/jh-team/gitlab:add-password-complexity-to-application-settings into master
related to !82798 (merged)
Related to #354965 (closed) Related to #348484 (closed)
What does this MR do and why?
Adding password complexity configuration fields to the Sign-up restrictions on General Settings page. This MR only includes backend implementation, frontend part can be found in this MR !86852 (merged).
This MR also exposes the complexity settings to /api/v4/application/settings
api.
Proposal
To make this feature available, the following changes should be applied to Application Settings
-
Push licensed feature password_complexity
togeneral
action to let frontend know whether it has this licensed feature -
Add password complexity config fields to signup_form
components, so we can update these settings on General Settings page. -
Put rules toGon
for frontend form validation in this MR -
Expose complexity settings to api -
Update api docs
Screenshots or screen recordings
NO UI changes
How to set up and validate locally
With license
- Given a GitLab instance with premium license
- And update complexity settings in Postman
{{APP_PATH}}/api/v4/application/settings
- Then you should see the complexity settings are updated.
Without license
- Given a GitLab instance WITHOUT license
- And update complexity settings in Postman
{{APP_PATH}}/api/v4/application/settings
- Then you should NOT see the complexity settings are updated.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
/cc @prajnamas
Edited by Hannah Sutor