Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add REMOTE_AUTH_BACKEND setting for ldap #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
# Enforcement of unique IP space can be toggled on a per-VRF basis. To enforce unique IP space within the global table
# (all prefixes and IP addresses not assigned to a VRF), set ENFORCE_GLOBAL_UNIQUE to True.
#
# @param include_ldap
# Makes sure the packages and the python modules needed for LDAP-authentication are installed and loaded.
# The LDAP-config itself is not handled by this Puppet module at present.
# Use the documentation found here: https://netbox.readthedocs.io/en/stable/installation/5-ldap/ for information about
# the config file.
#
# @param login_required
# 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.
Expand Down Expand Up @@ -155,6 +161,7 @@
String $base_path,
Boolean $debug,
Boolean $enforce_global_unique,
Boolean $include_ldap,
Boolean $login_required,
Boolean $metrics_enabled,
Boolean $prefer_ipv4,
Expand Down Expand Up @@ -212,6 +219,7 @@
'base_path' => $base_path,
'debug' => $debug,
'enforce_global_unique' => $enforce_global_unique,
'include_ldap' => $include_ldap,
'exempt_view_permissions' => $exempt_view_permissions,
'login_required' => $login_required,
'metrics_enabled' => $metrics_enabled,
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
base_path => $base_path,
debug => $debug,
enforce_global_unique => $enforce_global_unique,
include_ldap => $include_ldap,
login_required => $login_required,
metrics_enabled => $metrics_enabled,
prefer_ipv4 => $prefer_ipv4,
Expand Down
5 changes: 5 additions & 0 deletions templates/configuration.py.epp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Array $admins,
Boolean $debug,
Boolean $enforce_global_unique,
Boolean $include_ldap,
Boolean $login_required,
Boolean $metrics_enabled,
Boolean $prefer_ipv4,
Expand Down Expand Up @@ -55,6 +56,10 @@ DATABASE = {
'CONN_MAX_AGE': <%=$database_conn_max_age%>, # Max database connection age
}

<% if $include_ldap { -%>
REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend'
<% } -%>

# Redis database settings. The Redis database is used for caching and background processing such as webhooks
# Seperate sections for webhooks and caching allow for connecting to seperate Redis instances/datbases if desired.
# Full connection details are required in both sections, even if they are the same.
Expand Down