1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Update LDAP configuration documentation

This commit is contained in:
Jeremy Stretch
2020-06-03 15:57:11 -04:00
parent 040fadb0c3
commit dc161d9f2f
2 changed files with 13 additions and 3 deletions

View File

@ -386,7 +386,10 @@ NetBox can be configured to support remote user authentication by inferring user
Default: `'netbox.authentication.RemoteUserBackend'` Default: `'netbox.authentication.RemoteUserBackend'`
Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication, if not using NetBox's built-in backend. (Requires `REMOTE_AUTH_ENABLED`.) Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though backends may also be provided via other packages.
* `netbox.authentication.RemoteUserBackend`
* `netbox.authentication.LDAPBackend`
--- ---

View File

@ -36,7 +36,13 @@ Once installed, add the package to `local_requirements.txt` to ensure it is re-i
## Configuration ## Configuration
Create a file in the same directory as `configuration.py` (typically `netbox/netbox/`) named `ldap_config.py`. Define all of the parameters required below in `ldap_config.py`. Complete documentation of all `django-auth-ldap` configuration options is included in the project's [official documentation](http://django-auth-ldap.readthedocs.io/). First, enable the LDAP authentication backend in `configuration.py`. (Be sure to overwrite this definition if it is already set to `RemoteUserBackend`.)
```python
REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend'
```
Next, create a file in the same directory as `configuration.py` (typically `netbox/netbox/`) named `ldap_config.py`. Define all of the parameters required below in `ldap_config.py`. Complete documentation of all `django-auth-ldap` configuration options is included in the project's [official documentation](http://django-auth-ldap.readthedocs.io/).
### General Server Configuration ### General Server Configuration
@ -145,7 +151,8 @@ logfile = "/opt/netbox/logs/django-ldap-debug.log"
my_logger = logging.getLogger('django_auth_ldap') my_logger = logging.getLogger('django_auth_ldap')
my_logger.setLevel(logging.DEBUG) my_logger.setLevel(logging.DEBUG)
handler = logging.handlers.RotatingFileHandler( handler = logging.handlers.RotatingFileHandler(
logfile, maxBytes=1024 * 500, backupCount=5) logfile, maxBytes=1024 * 500, backupCount=5
)
my_logger.addHandler(handler) my_logger.addHandler(handler)
``` ```