keystone/releasenotes/notes/bug-1820333-356dcc8bf9f73fed.yaml
Corey Bryant d6df1dff3e PY3: Ensure LDAP searches use unicode attributes
This is a bug fix that corresponds to changes missed in commit
eca0829c4c.

In Python 3, python-ldap no longer allows bytes for some fields (DNs,
RDNs, attribute names, queries). Instead, text values are represented
as str, the Unicode text type. Compatibility support is provided for
Python 2 by setting bytes_mode=False [1]. This support was provided
in commit eca0829c4c.

In this patch we ensure that attribute names specified in searches
are no longer encoded.

[1] More details about byte/str usage in python-ldap can be found at:
http://www.python-ldap.org/en/latest/bytes_mode.html#bytes-mode

Change-Id: If3398e2d08ea14fa4b8c498b2a9a7c7edb47b9e5
Closes-Bug: #1820333
2019-03-18 19:03:18 -04:00

19 lines
847 B
YAML

---
fixes:
- |
[`bug 1798184 <https://bugs.launchpad.net/keystone/+bug/1798184>`_]
[`bug 1820333 <https://bugs.launchpad.net/keystone/+bug/1820333>`_]
In Python 3, python-ldap no longer allows bytes for some fields (DNs,
RDNs, attribute names, queries). Instead, text values are represented
as str, the Unicode text type. Compatibility support is provided for
Python 2 by setting bytes_mode=False [1].
The keystone LDAP backend is updated to adhere to this behavior by using
bytes_mode=False for Python 2 and dropping UTF-8 encoding and decoding
fields that are now represented as text in python-ldap.
[1] More details about byte/str usage in python-ldap can be found at:
http://www.python-ldap.org/en/latest/bytes_mode.html#bytes-mode
Note that at a minimum python-ldappool 2.3.1 is required.