LDAP cannot be disabled #3077

Closed
opened 2025-12-29 18:25:25 +01:00 by adam · 1 comment
Owner

Originally created by @xucito on GitHub (Dec 17, 2019).

Environment

  • Python version:
    2.7
  • NetBox version:
    2.3.5

Steps to Reproduce

  1. Enable LDAP by adding the ldap_config.py as defined by docs
  2. Access Netbox successfully using a LDAP user
  3. Remove the ldap_config.py file
  4. Restart Netbox
  5. Try login, Netbox will still try access the LDAP server first before searching for local application users

Expected Behavior

LDAP authentication will not be attempted

Observed Behavior

Logs show that LDAP server is trying to be contacted

Note

This is especially an issue for situations where the LDAP provider becomes unavailable as the attempt to contact the LDAP server has a longer timeout then the default gunicorn timeout therefore login attempts will fail with a 502 result.

This can be diagnosed by then running the Netbox in test mode via the console

Originally created by @xucito on GitHub (Dec 17, 2019). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: <!-- Example: 3.5.4 --> 2.7 * NetBox version: <!-- Example: 2.5.2 --> 2.3.5 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a wrapper like pynetbox. --> ### Steps to Reproduce 1. Enable LDAP by adding the `ldap_config.py` as defined by [docs](https://netbox.readthedocs.io/en/stable/installation/4-ldap/) 2. Access Netbox successfully using a LDAP user 3. Remove the `ldap_config.py` file 4. Restart Netbox 5. Try login, Netbox will still try access the LDAP server first before searching for local application users <!-- What did you expect to happen? --> ### Expected Behavior LDAP authentication will not be attempted <!-- What happened instead? --> ### Observed Behavior Logs show that LDAP server is trying to be contacted ### Note This is especially an issue for situations where the LDAP provider becomes unavailable as the attempt to contact the LDAP server has a longer timeout then the default gunicorn timeout therefore login attempts will fail with a 502 result. This can be diagnosed by then running the Netbox in test mode via the console
adam closed this issue 2025-12-29 18:25:25 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 17, 2019):

NetBox version: v2.3.5

This is a very old release. Please upgrade to the current stable release (v2.6.9) and ask to re-open this issue if you are still able to reproduce the reported problem.

@jeremystretch commented on GitHub (Dec 17, 2019): > NetBox version: v2.3.5 This is a very old release. Please upgrade to the current stable release (v2.6.9) and ask to re-open this issue if you are still able to reproduce the reported problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3077