Skip to content

Feature: Make strict password checking optional#8957

Merged
lstein merged 6 commits intoinvoke-ai:mainfrom
lstein:copilot/enhancement-relax-password-checking
Mar 10, 2026
Merged

Feature: Make strict password checking optional#8957
lstein merged 6 commits intoinvoke-ai:mainfrom
lstein:copilot/enhancement-relax-password-checking

Conversation

@lstein
Copy link
Collaborator

@lstein lstein commented Mar 10, 2026

Summary

This PR adds a new strict_password_checking option to the invokeai.yaml configuration file that adjusts how password checking is performed in multiuser mode. When this option is absent or false, the system will accept any password, but will issue an advisory about the password strength:

- 🔴 "Weak password" 
- 🟡 "Moderate password"
- 🔵 "Strong password"

With strict_password_checking: true, the former behavior is restored and the user must provide a password 8 characters or longer with a mixture of upper, lowercase and numbers.

Password checking is now implemented on both the front and backend, so that if strict password checking is turned on, the user cannot work around it by calling an endpoint directly.

Related Issues / Discussions

See discord comments on the password requirements.

QA Instructions

  1. Start InvokeAI with multiuser: true and strict_password_checkingabsent orfalse`
  2. Navigate to admin setup — type a short/weak password and verify the colored strength label updates live without blocking submission
  3. Set strict_password_checking: true in invokeai.yaml, restart, and verify weak passwords are blocked with an error message (existing behavior)
  4. Repeat strength/blocking checks in User Profile (change password) and User Management (create/edit user modal)

Merge Plan

Simple merge

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added api python PRs that change python files services PRs that change app services frontend PRs that change frontend files python-tests PRs that change python tests labels Mar 10, 2026
@lstein lstein added the v6.13.x label Mar 10, 2026
…quirements

- Add `strict_password_checking: bool = Field(default=False)` to InvokeAIAppConfig
- Add `get_password_strength()` function to password_utils.py (returns weak/moderate/strong)
- Add `strict_password_checking` field to SetupStatusResponse API endpoint
- Update users_base.py and users_default.py to accept `strict_password_checking` param
- Update auth.py router to pass config.strict_password_checking to all user service calls
- Create shared frontend utility passwordUtils.ts for password strength validation
- Update AdministratorSetup, UserProfile, UserManagement components to:
  - Fetch strict_password_checking from setup status endpoint
  - Show colored strength indicators (red/yellow/blue) in non-strict mode
  - Allow any non-empty password in non-strict mode
  - Maintain strict validation behavior when strict_password_checking=True
- Update SetupStatusResponse type in auth.ts endpoint
- Add passwordStrength and passwordHelperRelaxed translation keys to en.json
- Add tests for new get_password_strength() function

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
@lstein lstein force-pushed the copilot/enhancement-relax-password-checking branch from d351e1d to 0fd4038 Compare March 10, 2026 03:22
@lstein lstein merged commit cd47b3b into invoke-ai:main Mar 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api frontend PRs that change frontend files python PRs that change python files python-tests PRs that change python tests services PRs that change app services v6.13.x

Projects

Status: 6.13.x

Development

Successfully merging this pull request may close these issues.

3 participants