infra/k8s/netbox/configs/extra.py

24 lines
926 B
Python
Raw Normal View History

2024-12-14 00:18:32 +00:00
# based on https://github.com/netbox-community/netbox-docker/blob/release/configuration/extra.py
import os
# Remote authentication support
REMOTE_AUTH_ENABLED = True
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
REMOTE_AUTH_HEADER = 'HTTP_X_FORWARDED_PREFERRED_USERNAME'
REMOTE_AUTH_USER_FIRST_NAME = 'HTTP_X_FORWARDED_PREFERRED_USERNAME'
REMOTE_AUTH_USER_LAST_NAME = 'HTTP_REMOTE_USER_LAST_NAME'
REMOTE_AUTH_USER_EMAIL = 'HTTP_X_FORWARDED_EMAIL'
REMOTE_AUTH_AUTO_CREATE_USER = True
REMOTE_AUTH_DEFAULT_GROUPS = []
REMOTE_AUTH_DEFAULT_PERMISSIONS = {}
# S3 storage
STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage'
STORAGE_CONFIG = {
'AWS_ACCESS_KEY_ID': os.getenv("AWS_ACCESS_KEY_ID"),
'AWS_SECRET_ACCESS_KEY': os.getenv("AWS_SECRET_ACCESS_KEY"),
'AWS_STORAGE_BUCKET_NAME': 'netbox',
'AWS_S3_REGION_NAME': 'us-sea-1',
'AWS_S3_ENDPOINT_URL': 'https://storage.home.finn.io'
}