mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Closes #7650: Add support for local account password validation
This commit is contained in:
parent
134742a8b7
commit
ea6cdc9673
@ -13,6 +13,23 @@ ADMINS = [
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## AUTH_PASSWORD_VALIDATORS
|
||||||
|
|
||||||
|
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. If configured, these will be applied whenever a user's password is updated to ensure that it meets minimum criteria such as length or complexity. An example is provided below. For more detail on the available options, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
|
||||||
|
|
||||||
|
```python
|
||||||
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
|
{
|
||||||
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||||
|
'OPTIONS': {
|
||||||
|
'min_length': 10,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## BASE_PATH
|
## BASE_PATH
|
||||||
|
|
||||||
Default: None
|
Default: None
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
* The `asn` query filter for sites now matches against the AS number of assigned ASNs.
|
* The `asn` query filter for sites now matches against the AS number of assigned ASNs.
|
||||||
* The `contact_name`, `contact_phone`, and `contact_email` fields have been removed from the site model. Please use the new contact model introduced in NetBox v3.1 to store contact information for sites.
|
* The `contact_name`, `contact_phone`, and `contact_email` fields have been removed from the site model. Please use the new contact model introduced in NetBox v3.1 to store contact information for sites.
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
* [#7650](https://github.com/netbox-community/netbox/issues/7650) - Add support for local account password validation
|
||||||
|
|
||||||
### Other Changes
|
### Other Changes
|
||||||
|
|
||||||
* [#7731](https://github.com/netbox-community/netbox/issues/7731) - Require Python 3.8 or later
|
* [#7731](https://github.com/netbox-community/netbox/issues/7731) - Require Python 3.8 or later
|
||||||
|
@ -72,6 +72,17 @@ ADMINS = [
|
|||||||
# ('John Doe', 'jdoe@example.com'),
|
# ('John Doe', 'jdoe@example.com'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Enable any desired validators for local account passwords below. For a list of included validators, please see the
|
||||||
|
# Django documentation at https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation.
|
||||||
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
|
# {
|
||||||
|
# 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||||
|
# 'OPTIONS': {
|
||||||
|
# 'min_length': 10,
|
||||||
|
# }
|
||||||
|
# },
|
||||||
|
]
|
||||||
|
|
||||||
# Base URL path if accessing NetBox within a directory. For example, if installed at https://example.com/netbox/, set:
|
# Base URL path if accessing NetBox within a directory. For example, if installed at https://example.com/netbox/, set:
|
||||||
# BASE_PATH = 'netbox/'
|
# BASE_PATH = 'netbox/'
|
||||||
BASE_PATH = ''
|
BASE_PATH = ''
|
||||||
|
@ -73,6 +73,7 @@ SECRET_KEY = getattr(configuration, 'SECRET_KEY')
|
|||||||
|
|
||||||
# Set static config parameters
|
# Set static config parameters
|
||||||
ADMINS = getattr(configuration, 'ADMINS', [])
|
ADMINS = getattr(configuration, 'ADMINS', [])
|
||||||
|
AUTH_PASSWORD_VALIDATORS = getattr(configuration, 'AUTH_PASSWORD_VALIDATORS', [])
|
||||||
BASE_PATH = getattr(configuration, 'BASE_PATH', '')
|
BASE_PATH = getattr(configuration, 'BASE_PATH', '')
|
||||||
if BASE_PATH:
|
if BASE_PATH:
|
||||||
BASE_PATH = BASE_PATH.strip('/') + '/' # Enforce trailing slash only
|
BASE_PATH = BASE_PATH.strip('/') + '/' # Enforce trailing slash only
|
||||||
|
Loading…
Reference in New Issue
Block a user