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].
Update the keystone LDAP backend 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.
Reviewed: https:/ /review. openstack. org/611190 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=eca0829c4c6 5e6b64f08023ce2 d5a55dc329248f
Committed: https:/
Submitter: Zuul
Branch: master
commit eca0829c4c65e6b 64f08023ce2d5a5 5dc329248f
Author: Corey Bryant <email address hidden>
Date: Tue Oct 16 16:19:15 2018 -0400
PY3: switch to using unicode text values
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].
Update the keystone LDAP backend to adhere to this behavior by using mode=False for Python 2 and dropping UTF-8 encoding and decoding
bytes_
fields that are now represented as text in python-ldap.
[1] More details about byte/str usage in python-ldap can be found at: www.python- ldap.org/ en/latest/ bytes_mode. html#bytes- mode
http://
Note that at a minimum python-ldappool 2.3.1 is required. For more
details see Depends-On's below.
Change-Id: Ifdd0644cd70424 07a008c85c0b2c4 0a971c90bc3 /review. openstack. org/611401 /review. openstack. org/613632 /review. openstack. org/614052
Closes-Bug: #1798184
Depends-On: https:/
Depends-On: https:/
Depends-On: https:/