diff --git a/root/defaults/configuration.py b/root/defaults/configuration.py index ca8c460..e20892f 100644 --- a/root/defaults/configuration.py +++ b/root/defaults/configuration.py @@ -33,8 +33,10 @@ # 'SENTINEL_SERVICE': 'netbox', 'PASSWORD': '{{REDIS_PASSWORD}}', 'DATABASE': {{REDIS_DB_TASK}}, - 'DEFAULT_TIMEOUT': 300, 'SSL': False, + # Set this to True to skip TLS certificate verification + # This can expose the connection to attacks, be careful + # 'INSECURE_SKIP_TLS_VERIFY': False, }, 'caching': { 'HOST': '{{REDIS_HOST}}', @@ -44,8 +46,10 @@ # 'SENTINEL_SERVICE': 'netbox', 'PASSWORD': '{{REDIS_PASSWORD}}', 'DATABASE': {{REDIS_DB_CACHE}}, - 'DEFAULT_TIMEOUT': 300, 'SSL': False, + # Set this to True to skip TLS certificate verification + # This can expose the connection to attacks, be careful + # 'INSECURE_SKIP_TLS_VERIFY': False, } } @@ -65,7 +69,7 @@ # Specify one or more name and email address tuples representing NetBox administrators. These people will be notified of # application errors (assuming correct email settings are provided). ADMINS = [ - # ['John Doe', 'jdoe@example.com'], + # ('John Doe', 'jdoe@example.com'), ] # URL schemes that are allowed within links in NetBox @@ -81,13 +85,10 @@ # Text to include on the login page above the login form. HTML is allowed. BANNER_LOGIN = '' -# Base URL path if accessing NetBox within a directory. For example, if installed at http://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 = '{{BASE_PATH}}' -# Cache timeout in seconds. Set to 0 to dissable caching. Defaults to 900 (15 minutes) -CACHE_TIMEOUT = 900 - # Maximum number of days to retain logged changes. Set to 0 to retain changes indefinitely. (Default: 90) CHANGELOG_RETENTION = 90 @@ -102,6 +103,20 @@ # r'^(https?://)?(\w+\.)?example\.com$', ] +# Specify any custom validators here, as a mapping of model to a list of validators classes. Validators should be +# instances of or inherit from CustomValidator. +# from extras.validators import CustomValidator +CUSTOM_VALIDATORS = { + # 'dcim.site': [ + # CustomValidator({ + # 'name': { + # 'min_length': 10, + # 'regex': r'\d{3}$', + # } + # }) + # ], +} + # Set to True to enable server debugging. WARNING: Debugging introduces a substantial performance penalty and may reveal # sensitive information about your installation. Only enable debugging while performing testing. Never enable debugging # on a production system. @@ -131,6 +146,9 @@ # 'ipam.prefix', ] +# Enable the GraphQL API +GRAPHQL_ENABLED = True + # HTTP proxies NetBox should use when sending outbound HTTP requests (e.g. for webhooks). # HTTP_PROXIES = { # 'http': 'http://10.10.1.10:3128', @@ -145,8 +163,12 @@ # https://docs.djangoproject.com/en/stable/topics/logging/ LOGGING = {} +# Automatically reset the lifetime of a valid session upon each authenticated request. Enables users to remain +# authenticated to NetBox indefinitely. +LOGIN_PERSISTENCE = False + # 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. +# are permitted to access most data in NetBox but not make any changes. LOGIN_REQUIRED = False # The length of time (in seconds) for which a user will remain logged into the web UI before being prompted to @@ -156,6 +178,9 @@ # Setting this to True will display a "maintenance mode" banner at the top of every page. MAINTENANCE_MODE = False +# The URL to use when mapping physical addresses or GPS coordinates +MAPS_URL = 'https://maps.google.com/?q=' + # An API consumer can request an arbitrary number of objects =by appending the "limit" parameter to the URL (e.g. # "?limit=1000"). This setting defines the maximum limit. Setting it to 0 or None will allow an API consumer to request # all objects by specifying "?limit=0". @@ -185,7 +210,7 @@ # NAPALM timeout (in seconds). (Default: 30) NAPALM_TIMEOUT = 30 -# NAPALM optional arguments (see http://napalm.readthedocs.io/en/latest/support/#optional-arguments). Arguments must +# NAPALM optional arguments (see https://napalm.readthedocs.io/en/latest/support/#optional-arguments). Arguments must # be provided as a dictionary. NAPALM_ARGS = {} @@ -220,9 +245,6 @@ REMOTE_AUTH_DEFAULT_GROUPS = {{REMOTE_AUTH_DEFAULT_GROUPS}} REMOTE_AUTH_DEFAULT_PERMISSIONS = {{REMOTE_AUTH_DEFAULT_PERMISSIONS}} -# This determines how often the GitHub API is called to check the latest release of NetBox. Must be at least 1 hour. -RELEASE_CHECK_TIMEOUT = 24 * 3600 - # This repository is used to check whether there is a new release of NetBox available. Set to None to disable the # version check or use the URL below to check for release in the official NetBox repository. RELEASE_CHECK_URL = None @@ -232,10 +254,16 @@ # this setting is derived from the installed location. # REPORTS_ROOT = '/opt/netbox/netbox/reports' +# Maximum execution time for background tasks, in seconds. +RQ_DEFAULT_TIMEOUT = 300 + # The file path where custom scripts will be stored. A trailing slash is not needed. Note that the default value of # this setting is derived from the installed location. SCRIPTS_ROOT = '/config/scripts' +# The name to use for the session cookie. +SESSION_COOKIE_NAME = 'sessionid' + # By default, NetBox will store session data in the database. Alternatively, a file path can be specified here to use # local file storage instead. (This can be useful for enabling authentication on a standby instance with read-only # database access.) Note that the user as which NetBox runs must have read and write permissions to this path.