Enforce a minimum length for SECRET_KEY #7944

Closed
opened 2025-12-29 20:30:20 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Apr 25, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.4.8

Feature type

Change to existing functionality

Proposed functionality

Require a minimum length for the SECRET_KEY configuration parameter.

Use case

The secret key, which is passed as Django's SECRET_KEY setting, is used for session cookie validation and similar functions. However, Django itself does not force a minimum key length. NetBox should enforce a minimum key length as a sanity check against empty or insufficient keys.

The recommended minimum length is 50 characters.

Database changes

No response

External dependencies

No response

Originally created by @jeremystretch on GitHub (Apr 25, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.4.8 ### Feature type Change to existing functionality ### Proposed functionality Require a minimum length for the `SECRET_KEY` configuration parameter. ### Use case The secret key, which is passed as Django's [`SECRET_KEY` setting](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-SECRET_KEY), is used for session cookie validation and similar functions. However, Django itself does not force a minimum key length. NetBox should enforce a minimum key length as a sanity check against empty or insufficient keys. The recommended minimum length is 50 characters. ### Database changes _No response_ ### External dependencies _No response_
adam added the status: acceptedtype: feature labels 2025-12-29 20:30:20 +01:00
adam closed this issue 2025-12-29 20:30:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7944