Skip to content

Configured password validators are not executing when creating a new user or changing the password for existing user #16964

Closed
@nishant131

Description

@nishant131

Deployment Type

NetBox Cloud

NetBox Version

v4.0.7

Python Version

3.10

Steps to Reproduce

  1. Configure password validation in the netbox/netbox/configuration.py file. Refer below code for the same:
AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
        'OPTIONS': {
            'min_length': 8,
        }
    }
]
  1. Login as a superuser.
  2. Click "Admin" -> "Authentication" -> "Users"
  3. Click on "+ Add".
  4. Fill the details for the user and set password and confirm password as pass1.
  5. Click "Create".
  6. User gets created successfully.

Instead of adding a new user from step 4 to 6, we can also just update the password for an existing users, and set it as pass1. The result would be the same.

Expected Behavior

User creation or password updation should fail from "Admin" -> "Authentication" -> "Users".

Observed Behavior

User is being created without adhering to the configured password policy.

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions