Those changes didn't happen in stable/queens so _dn_to_id should still be UTF-8 encoding/decoding the appropriate fields. In other words it should still be using the following in stable/queens:
def _dn_to_id(self, dn):
# Check if the naming attribute in the DN is the same as keystone's
# configured 'id' attribute'. If so, extract the ID value from the DN
if self.id_attr == utf8_decode( ldap.dn.str2dn(utf8_encode(dn))[0][0][0].lower()):
return utf8_decode(ldap.dn.str2dn(utf8_encode(dn))[0][0][1])
There's a regression in the LDAP common backend code due to a recent stable/queens backport that shouldn't have been backported past stable/rocky.
The following patch shouldn't have been backported to stable/queens: /review. opendev. org/#/c/ 672519/
https:/
The reason why is because the following patch, which switched to bytes_mode=False, doesn't exist in stable/queens: /review. opendev. org/#/c/ 613648/ /review. opendev. org/#/c/ 613648/ 4/keystone/ identity/ backends/ ldap/common. py.
https:/
In particular see the changes to _dn_to_id() in https:/
Those changes didn't happen in stable/queens so _dn_to_id should still be UTF-8 encoding/decoding the appropriate fields. In other words it should still be using the following in stable/queens:
def _dn_to_id(self, dn):
ldap. dn.str2dn( utf8_encode( dn))[0] [0][0]. lower() ): ldap.dn. str2dn( utf8_encode( dn))[0] [0][1])
# Check if the naming attribute in the DN is the same as keystone's
# configured 'id' attribute'. If so, extract the ID value from the DN
if self.id_attr == utf8_decode(
return utf8_decode(