Skip to content

Commit df3ab69

Browse files
authored
Merge pull request #310 from shuichiro-makigaki/add-remote-auth
Add REMOTE_AUTH_* configs
2 parents 5133162 + 38f4474 commit df3ab69

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

configuration/configuration.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ def read_secret(secret_name):
203203
# this setting is derived from the installed location.
204204
SCRIPTS_ROOT = os.environ.get('SCRIPTS_ROOT', '/etc/netbox/scripts')
205205

206+
# Remote authentication support
207+
REMOTE_AUTH_ENABLED = os.environ.get('REMOTE_AUTH_ENABLED', 'False').lower() == 'true'
208+
REMOTE_AUTH_BACKEND = os.environ.get('REMOTE_AUTH_BACKEND', 'netbox.authentication.RemoteUserBackend')
209+
REMOTE_AUTH_HEADER = os.environ.get('REMOTE_AUTH_HEADER', 'HTTP_REMOTE_USER')
210+
REMOTE_AUTH_AUTO_CREATE_USER = os.environ.get('REMOTE_AUTH_AUTO_CREATE_USER', 'True').lower() == 'true'
211+
REMOTE_AUTH_DEFAULT_GROUPS = list(filter(None, os.environ.get('REMOTE_AUTH_DEFAULT_GROUPS', '').split(' ')))
212+
206213
# Time zone (default: UTC)
207214
TIME_ZONE = os.environ.get('TIME_ZONE', 'UTC')
208215

0 commit comments

Comments
 (0)