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/613648 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=a2e7ccb4b32 140f122c0beee0f 3fcc1109db36bf
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit a2e7ccb4b32140f 122c0beee0f3fcc 1109db36bf
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 64f08023ce2d5a5 5dc329248f)
Closes-Bug: #1798184
Depends-On: https:/
Depends-On: https:/
Depends-On: https:/
(cherry picked from commit eca0829c4c65e6b