keystone/keystone/tests/unit/identity
Lance Bragstad a0b6560364 Properly handle octet (byte) strings when converting LDAP responses
If LDAP returns a UUID as an octet string the LDAP driver will fail to
convert it to something meaningful. The error usually looks something
like:

  ID attribute objectGUID not found in LDAP object

Microsoft AD's `objectGUID` parameter is stored and transmitted as an
octet string [0]. If you attempt to use the `objectGUID` to generate
user or group IDs, you'll get an HTTP 404 because keystone can't decode
it properly. This is unfortunate because `objectGUID` are a fixed
length, UUID format, and ideal for generating IDs in keystone. As
opposed to using the object's CN, which is variable length, and can
generate hashes that are larger than keystone's database table limit for
user IDs.

[0] https://docs.microsoft.com/en-us/windows/win32/ad/reading-an-objectampaposs-objectguid-and-creating-a-string-representation-of-the-guid

Conflicts:
      keystone/identity/backends/ldap/common.py

      Due to python2 -> python3 migration code.

Change-Id: Id80b17bdff015e10340e636102576b7435bd564f
Closes-Bug: 1889936
(cherry picked from commit 8bf222ac5d)
(cherry picked from commit d5870f69c1)
2020-11-11 10:46:43 -06:00
..
backends Properly handle octet (byte) strings when converting LDAP responses 2020-11-11 10:46:43 -06:00
shadow_users Convert auth to flask native dispatching 2018-10-09 23:23:03 -07:00
__init__.py Variable 'domain_ref' referenced before assignment 2014-02-17 14:46:23 +00:00
test_backend_sql.py Drop the compatibility password column 2018-11-12 02:38:31 +00:00
test_backends.py Correcting tests with project_id 2019-02-13 14:32:19 +05:30
test_core.py Enable foreign keys for unit test 2018-10-09 09:50:21 +08:00