Modernize the Active Directory backend.

Review Request #11356 — Created Dec. 30, 2020 and submitted

Information

Review Board
release-4.0.x

Reviewers

The Active Directory backend is old, did not have adequate testing, and
didn't work right with a modern environment in 4.0 beta.

This change updates it for proper Python 3 compatibility. This is
largely done by turning off byte string mode in python-ldap, which
ensures all strings will be Unicode. This gets us a lot for free. As
part of this upgrade, we also make use of some utility functions for
building DNs, so that we don't have to worry about escaping content
correctly.

DNS discovery has been updated to use dnspython, instead of the old
PyDNS. We already depend on this in Djblets, for DMARC support.
Because of this, we no longer have to conditionally offer DNS discovery.

Logging has been updated to always include HTTP request information, for
easier debugging. Some logs have been improved as well.

Many new unit tests have been added, instrumenting all of the backend's
capabilities.

Unit tests pass on all versions of Python.

Summary ID
Modernize the Active Directory backend.
The Active Directory backend is old, did not have adequate testing, and didn't work right with a modern environment in 4.0 beta. This change updates it for proper Python 3 compatibility. This is largely done by turning off byte string mode in `python-ldap`, which ensures all strings will be Unicode. This gets us a lot for free. As part of this upgrade, we also make use of some utility functions for building DNs, so that we don't have to worry about escaping content correctly. DNS discovery has been updated to use `dnspython`, instead of the old `PyDNS`. We already depend on this in Djblets, for DMARC support. Because of this, we no longer have to conditionally offer DNS discovery. Logging has been updated to always include HTTP request information, for easier debugging. Some logs have been improved as well. Many new unit tests have been added, instrumenting all of the backend's capabilities.
c441bc415a52d38b8718b95101d6b1bf7aa3e7ff
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (c1c0875)
Loading...