From 8c691f13089aef8da74a8e6fbfe4c49c247f7942 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Tue, 21 May 2024 13:04:35 +0200 Subject: [PATCH] Change LOGIN_REQUIRED default to 'True' --- configuration/configuration.py | 6 +++--- test-configuration/test_config.py | 1 + test.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/configuration/configuration.py b/configuration/configuration.py index 2145a25..78fe58e 100644 --- a/configuration/configuration.py +++ b/configuration/configuration.py @@ -221,9 +221,9 @@ if 'GRAPHQL_ENABLED' in environ: # authenticated to NetBox indefinitely. LOGIN_PERSISTENCE = _environ_get_and_map('LOGIN_PERSISTENCE', 'False', _AS_BOOL) -# Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users -# are permitted to access most data in NetBox (excluding secrets) but not make any changes. -LOGIN_REQUIRED = _environ_get_and_map('LOGIN_REQUIRED', 'False', _AS_BOOL) +# When enabled, only authenticated users are permitted to access any part of NetBox. +# Disabling this will allow unauthenticated users to access most areas of NetBox (but not make any changes). +LOGIN_REQUIRED = _environ_get_and_map('LOGIN_REQUIRED', 'True', _AS_BOOL) # The length of time (in seconds) for which a user will remain logged into the web UI before being prompted to # re-authenticate. (Default: 1209600 [14 days]) diff --git a/test-configuration/test_config.py b/test-configuration/test_config.py index 884defd..09bd5dc 100644 --- a/test-configuration/test_config.py +++ b/test-configuration/test_config.py @@ -4,3 +4,4 @@ LOGGING = { } DEFAULT_PERMISSIONS = {} +LOGIN_REQUIRED = False diff --git a/test.sh b/test.sh index 62ed3cb..f415cd7 100755 --- a/test.sh +++ b/test.sh @@ -84,7 +84,7 @@ test_netbox_web() { --retry 5 \ --retry-delay 0 \ --retry-max-time 40 \ - http://127.0.0.1:8000/ + http://127.0.0.1:8000/login/ ) if [ "$RESP_CODE" == "200" ]; then echo "Webservice running"