Compare commits

...

25 commits

Author SHA1 Message Date
Skye Fugate 2c6de0d0c0
Merge 39d2b726af into 10a57990e2 2025-10-24 13:48:30 +02:00
Tobias Genannt 10a57990e2
Merge pull request #1553 from netbox-community/renovate/dulwich-0.x
Some checks failed
push / Checks syntax of our code (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
Update dependency dulwich to v0.24.7
2025-10-23 15:18:16 +02:00
renovate[bot] 2d6d5058fe
Update dependency dulwich to v0.24.7 2025-10-23 12:46:08 +00:00
Tobias Genannt f6cab681b4
Merge pull request #1547 from WillNilges/patch-1
Some checks are pending
push / Checks syntax of our code (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
Correct typo in launch-netbox.sh
2025-10-22 14:52:48 +02:00
Tobias Genannt 4bdf66157b
Merge pull request #1550 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.42.1
2025-10-22 14:20:41 +02:00
renovate[bot] 73bbf17d6b
Update dependency sentry-sdk to v2.42.1 2025-10-20 15:32:40 +00:00
Tobias Genannt 9b2793a808
Merge pull request #1548 from netbox-community/renovate/dulwich-0.x
Some checks failed
push / Checks syntax of our code (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
Update dependency dulwich to v0.24.6
2025-10-19 15:31:13 +02:00
renovate[bot] b0aad0dfda
Update dependency dulwich to v0.24.6 2025-10-19 12:45:34 +00:00
Willard Nilges eb2822a978
Fix typo in error message for Unit configuration 2025-10-19 01:17:23 -04:00
Tobias Genannt 016a2ab4fe
Merge pull request #1542 from netbox-community/renovate/dulwich-0.x
Some checks failed
push / Checks syntax of our code (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
Update dependency dulwich to v0.24.5
2025-10-16 19:39:19 +02:00
renovate[bot] 56d27f84a7
Update dependency dulwich to v0.24.5 2025-10-16 14:11:49 +00:00
Tobias Genannt 24641dabc5
Merge pull request #1540 from netbox-community/renovate/sentry-sdk-2.x
Some checks are pending
push / Checks syntax of our code (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
Update dependency sentry-sdk to v2.42.0
2025-10-15 13:16:39 +02:00
renovate[bot] 07258394d1
Update dependency sentry-sdk to v2.42.0 2025-10-15 10:43:52 +00:00
Tobias Genannt b6cc5e3c06
Merge pull request #1537 from netbox-community/renovate/dulwich-0.x
Some checks are pending
push / Checks syntax of our code (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
Update dependency dulwich to v0.24.4
2025-10-15 06:43:09 +02:00
renovate[bot] 95bcfeb69d
Update dependency dulwich to v0.24.4 2025-10-14 21:08:52 +00:00
Tobias Genannt c10d4e71c7
Merge pull request #1533 from netbox-community/renovate/sentry-sdk-2.x
Some checks are pending
push / Checks syntax of our code (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
Update dependency sentry-sdk to v2.41.0
2025-10-14 07:17:32 +02:00
renovate[bot] 85615a9bea
Update dependency sentry-sdk to v2.41.0 2025-10-14 04:46:28 +00:00
Tobias Genannt 1abb784f9b
Merge pull request #1535 from netbox-community/renovate/dulwich-0.x
Update dependency dulwich to v0.24.3
2025-10-14 06:45:35 +02:00
renovate[bot] f89f907408
Update dependency dulwich to v0.24.3 2025-10-14 01:45:18 +00:00
Tobias Genannt 6b7121564b
Merge pull request #1532 from tobiasge/new-api-token
Some checks failed
push / Checks syntax of our code (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
Support new API_TOKEN format
2025-10-10 11:36:01 +02:00
Tobias Genannt 1f0ef020a9 Support new API_TOKEN format
Allows configuration the new API_TOKEN_PEPPERS setting from an
ENV variable or secret file.

Feature request: https://github.com/netbox-community/netbox/issues/20210
Pull request: https://github.com/netbox-community/netbox/pull/20477
2025-10-08 08:26:27 +02:00
Tobias Genannt ae5f7d2419
Merge pull request #1524 from netbox-community/develop
Version 3.4.1
2025-09-26 11:04:31 +02:00
Tobias Genannt b1394ff9cb
Merge pull request #1508 from netbox-community/develop
Version 3.4.0
2025-09-04 09:59:09 +02:00
Skye A. Fugate 39d2b726af Secrets example 2025-07-03 13:18:34 -05:00
Skye A. Fugate eaad696666 feat: add SSO environment variable support for OKTA and Google OAuth2
Add native support for SSO configuration through environment variables
and Docker secrets, eliminating the need to modify configuration.py
for common SSO providers.

Changes:
- Add OKTA OpenID Connect configuration variables:
  - SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY (env var)
  - SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET (env var + Docker secret: okta_openidconnect_secret)
  - SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL (env var)

- Add Google OAuth2 configuration variables:
  - SOCIAL_AUTH_GOOGLE_OAUTH2_KEY (env var)
  - SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET (env var + Docker secret: google_oauth2_secret)

Follows existing patterns with _read_secret() for sensitive data and
environ.get() for non-sensitive configuration.

Resolves: netbox-community/netbox-docker#1139
2025-07-03 13:12:52 -05:00
7 changed files with 42 additions and 4 deletions

View file

@ -36,12 +36,13 @@ jobs:
SUPPRESS_POSSUM: true SUPPRESS_POSSUM: true
LINTER_RULES_PATH: / LINTER_RULES_PATH: /
VALIDATE_ALL_CODEBASE: false VALIDATE_ALL_CODEBASE: false
VALIDATE_BIOME_FORMAT: false
VALIDATE_CHECKOV: false VALIDATE_CHECKOV: false
VALIDATE_DOCKERFILE: false VALIDATE_DOCKERFILE: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_GITLEAKS: false VALIDATE_GITLEAKS: false
VALIDATE_JSCPD: false VALIDATE_JSCPD: false
VALIDATE_TRIVY: false VALIDATE_TRIVY: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*) FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*)
EDITORCONFIG_FILE_NAME: .editorconfig-checker.json EDITORCONFIG_FILE_NAME: .editorconfig-checker.json
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml

View file

@ -116,6 +116,11 @@ REDIS = {
# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-SECRET_KEY # https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-SECRET_KEY
SECRET_KEY = _read_secret('secret_key', environ.get('SECRET_KEY', '')) SECRET_KEY = _read_secret('secret_key', environ.get('SECRET_KEY', ''))
API_TOKEN_PEPPERS = {}
if api_token_pepper := _read_secret('api_token_pepper_1', environ.get('API_TOKEN_PEPPER_1', '')):
API_TOKEN_PEPPERS.update({1: api_token_pepper})
######################### #########################
# # # #
@ -305,6 +310,12 @@ REMOTE_AUTH_SUPERUSER_GROUPS = _environ_get_and_map('REMOTE_AUTH_SUPERUSER_GROUP
REMOTE_AUTH_SUPERUSERS = _environ_get_and_map('REMOTE_AUTH_SUPERUSERS', '', _AS_LIST) REMOTE_AUTH_SUPERUSERS = _environ_get_and_map('REMOTE_AUTH_SUPERUSERS', '', _AS_LIST)
REMOTE_AUTH_STAFF_GROUPS = _environ_get_and_map('REMOTE_AUTH_STAFF_GROUPS', '', _AS_LIST) REMOTE_AUTH_STAFF_GROUPS = _environ_get_and_map('REMOTE_AUTH_STAFF_GROUPS', '', _AS_LIST)
REMOTE_AUTH_STAFF_USERS = _environ_get_and_map('REMOTE_AUTH_STAFF_USERS', '', _AS_LIST) REMOTE_AUTH_STAFF_USERS = _environ_get_and_map('REMOTE_AUTH_STAFF_USERS', '', _AS_LIST)
# SSO Configuration
SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY')
SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET = _read_secret('okta_openidconnect_secret', environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET', ''))
SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL')
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = environ.get('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY')
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = _read_secret('google_oauth2_secret', environ.get('SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET', ''))
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the # 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. # version check or use the URL below to check for release in the official NetBox repository.

View file

@ -19,4 +19,17 @@ services:
# SUPERUSER_EMAIL: "" # SUPERUSER_EMAIL: ""
# SUPERUSER_NAME: "" # SUPERUSER_NAME: ""
# SUPERUSER_PASSWORD: "" # SUPERUSER_PASSWORD: ""
# SSO Configuration
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY: "your_okta_client_id"
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL: "https://your-domain.okta.com"
# SOCIAL_AUTH_GOOGLE_OAUTH2_KEY: "your_google_client_id"
# secrets:
# - okta_openidconnect_secret
# - google_oauth2_secret
# Uncomment to use Docker secrets for SSO credentials
# secrets:
# okta_openidconnect_secret:
# file: ./secrets/okta_secret.txt
# google_oauth2_secret:
# file: ./secrets/google_secret.txt

View file

@ -36,7 +36,7 @@ load_configuration() {
http://localhost/config http://localhost/config
) )
if [ "$RESP_CODE" != "200" ]; then if [ "$RESP_CODE" != "200" ]; then
echo "⚠️ Could no load Unit configuration" echo "⚠️ Could not load Unit configuration"
kill "$(cat /opt/unit/unit.pid)" kill "$(cat /opt/unit/unit.pid)"
return 1 return 1
fi fi

9
env/netbox.env vendored
View file

@ -1,3 +1,4 @@
API_TOKEN_PEPPER_1=Qy+F=OTeGskWQ(wTMgjc+NPPlz6YwFXY=KHIIg=wpYXT&e(6u8
CORS_ORIGIN_ALLOW_ALL=True CORS_ORIGIN_ALLOW_ALL=True
DB_HOST=postgres DB_HOST=postgres
DB_NAME=netbox DB_NAME=netbox
@ -30,4 +31,12 @@ REDIS_SSL=false
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X' SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X'
SKIP_SUPERUSER=true SKIP_SUPERUSER=true
# SSO Configuration (uncomment and configure as needed)
# OKTA OpenID Connect
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY=your_okta_client_id
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET=your_okta_client_secret
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL=https://your-domain.okta.com
# Google OAuth2
# SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=your_google_client_id
# SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET=your_google_client_secret
WEBHOOKS_ENABLED=true WEBHOOKS_ENABLED=true

View file

@ -1,6 +1,6 @@
django-auth-ldap==5.2.0 django-auth-ldap==5.2.0
dulwich==0.24.2 dulwich==0.24.7
python3-saml==1.16.0 python3-saml==1.16.0
--no-binary lxml --no-binary lxml
--no-binary xmlsec --no-binary xmlsec
sentry-sdk[django]==2.40.0 sentry-sdk[django]==2.42.1

View file

@ -10,3 +10,7 @@ PLUGINS = [
ALLOW_TOKEN_RETRIEVAL = True ALLOW_TOKEN_RETRIEVAL = True
DEFAULT_PERMISSIONS = {} DEFAULT_PERMISSIONS = {}
API_TOKEN_PEPPERS = {
1: 'TEST-VALUE-DO-NOT-USE-TEST-VALUE-DO-NOT-USE-TEST-VALUE-DO-NOT-USE',
}