Correcting misspellings and clarifying explanations

This commit is contained in:
Daniel W. Anner 2023-09-07 18:51:16 +00:00 committed by GitHub
parent 4ca9afddcb
commit f5c9462201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,11 +179,11 @@ LOGGING = {
Ensure the file and path specified in logfile exist and are writable and executable by the application service account. Restart the netbox service and attempt to log into the site to trigger log entries to this file.
## Autneticating with Active Directory (with or without the @fqdn.tld suffix)
## Authenticating with Active Directory (with or without the @fqdn.tld suffix)
Interfacing with Active Directory for authentication can be a bit of a headache. One edge case you can easily solve is handling different login formats. The two main formats we are supporting is allowing the user to login with either the full UPN or just the username. To do so we need to filter the DN based on either the `sAMAccountName` or the `userPrincipalName`. Below we will define some basic configuration options which will allow your users to enter their usernames in the format `username` or `username@domain.tld`.
Integrating Active Directory for authentication can be a bit challenging. Handling different login formats is an edge case you can easily resolve. This solution will allow users to log in either using their full UPN or their username alone. Therefore, we need to filter the DN according to either the `sAMAccountName` or the `userPrincipalName`. The following configuration options will allow your users to enter their usernames in the format `username` or `username@domain.tld`.
These configuration options are definited within `ldap_config.py`. First, modify the `AUTH_LDAP_USER_SEARCH` option to match the following:
Just as before, the configuration options are defined in the file ldap_config.py. First, modify the `AUTH_LDAP_USER_SEARCH` option to match the following:
```python
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=Users,dc=example,dc=com",
@ -192,7 +192,7 @@ AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=Users,dc=example,dc=com",
)
```
Also, ensure that `AUTH_LDAP_USER_DN_TEMPLATE` is set to `None` as described above. Next, modify `AUTH_LDAP_USER_ATTR_MAP` to match the following:
In addition, `AUTH_LDAP_USER_DN_TEMPLATE` should be set to `None` as described in the previous sections. Next, modify `AUTH_LDAP_USER_ATTR_MAP` to match the following:
```python
AUTH_LDAP_USER_ATTR_MAP = {
@ -203,10 +203,10 @@ AUTH_LDAP_USER_ATTR_MAP = {
}
```
Lastly, we need to add one aditional configuration option; `AUTH_LDAP_USER_QUERY_FIELD`. Add the following to your LDAP configuration file:
Finally, we need to add one more configuration option, `AUTH_LDAP_USER_QUERY_FIELD`. The following should be added to your LDAP configuration file:
```python
AUTH_LDAP_USER_QUERY_FIELD = "username"
```
These configuration options will allow your users to login with either the UPN suffix or without it.
With these configuration options, your users will be able to login either with or without the UPN suffix.