Skip to content

Commit bed40b0

Browse files
authored
Add STARTTLS option. (#277)
* Add STARTTLS option.
1 parent 24f0545 commit bed40b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

configuration/ldap_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def import_group_type(group_type_name):
3737
# Set a string template that describes any user’s distinguished name based on the username.
3838
AUTH_LDAP_USER_DN_TEMPLATE = os.environ.get('AUTH_LDAP_USER_DN_TEMPLATE', None)
3939

40+
# Enable STARTTLS for ldap authentication.
41+
AUTH_LDAP_START_TLS = os.environ.get('AUTH_LDAP_START_TLS', 'False').lower() == 'true'
42+
4043
# Include this setting if you want to ignore certificate errors. This might be needed to accept a self-signed cert.
4144
# Note that this is a NetBox-specific setting which sets:
4245
# ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)

0 commit comments

Comments
 (0)