LDAP attribute names are case-insensitive, and different LDAP
server implementations behave differently when returning search
results. Keystone attempts to use the attribute names as defined
in the mapping configuration when checking for values in the dict
that represents the search results. If the case doesn't match,
we won't find the values which can lead to errors.
This patch converts the dictionary keys to lowercase to allow us
to perform a case-insensitive lookup when processing LDAP search
results. When we create the model object, we still use the
attribute name case as defined in the mapping to allow predictable
lookups when we process the model object later.
Change-Id: Ib9a03b912bc7652dc6a61b1c97a950e263a9c6fa
Closes-bug: 1281216
(cherry picked from commit 7c104e13fce919dd2563f06ce31c059f145beb77)
Reviewed: https:/ /review. openstack. org/89898 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=1716748df15 443f1141f69ea62 0c4bc33758433d
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 1716748df15443f 1141f69ea620c4b c33758433d
Author: Nathan Kinder <email address hidden>
Date: Wed Apr 9 18:24:21 2014 -0700
Treat LDAP attribute names as case-insensitive
LDAP attribute names are case-insensitive, and different LDAP
server implementations behave differently when returning search
results. Keystone attempts to use the attribute names as defined
in the mapping configuration when checking for values in the dict
that represents the search results. If the case doesn't match,
we won't find the values which can lead to errors.
This patch converts the dictionary keys to lowercase to allow us
to perform a case-insensitive lookup when processing LDAP search
results. When we create the model object, we still use the
attribute name case as defined in the mapping to allow predictable
lookups when we process the model object later.
Change-Id: Ib9a03b912bc765 2dc6a61b1c97a95 0e263a9c6fa d2563f06ce31c05 9f145beb77)
Closes-bug: 1281216
(cherry picked from commit 7c104e13fce919d