← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1419187] Re: ldap unicode issue with mapping id generator

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1419187

Title:
  ldap unicode issue with mapping id generator

Status in OpenStack Identity (Keystone):
  Fix Released
Status in Keystone juno series:
  Fix Committed

Bug description:
  exception when listing users in ldap:

  2015-02-06 14:52:21.934 27199 ERROR keystone.common.wsgi [-] 'ascii' codec can't encode character u'\xe9' in position 19: ordinal not in range(128)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi Traceback (most recent call last):
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 223, in __call__
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     result = method(context, **params)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/controllers.py", line 48, in get_users
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     CONF.identity.default_domain_id)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/manager.py", line 47, in wrapper
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     return f(self, *args, **kwargs)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 202, in wrapper
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     return f(self, *args, **kwargs)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 213, in wrapper
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     return f(self, *args, **kwargs)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 620, in list_users
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     ref_list, domain_scope, driver, mapping.EntityType.USER)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 328, in _set_domain_id_and_mapping
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     x, domain_id, driver, entity_type) for x in ref]
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 325, in _set_domain_id_and_mapping
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     ref, domain_id, driver, entity_type, conf)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 359, in _set_domain_id_and_mapping_for_single_ref
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     local_entity, public_id)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/mapping_backends/sql.py", line 70, in create_id_mapping
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     public_id = self.id_generator_api.generate_public_ID(entity)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/id_generators/sha256.py", line 27, in generate_public_ID
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi     m.update(mapping[key])
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 19: ordinal not in range(128)
  2015-02-06 14:52:21.934 27199 TRACE keystone.common.wsgi
  2015-02-06 14:52:21.959 27199 INFO eventlet.wsgi.server [-] 172.20.96.65 - - [06/Feb/2015 14:52:21] "GET /v2.0/users HTTP/1.1" 500 291 23.150229

  
  'local_entity' is here: 
  https://github.com/openstack/keystone/blob/c4c8d0b99a0404f4dcdb2f87c48fe15ee1526197/keystone/identity/mapping_backends/sql.py#L66

  its: {'local_id': u'^PNNL T&Q Communiqu\xe9', 'domain_id': 
                    'default', 'entity_type': 'user'}

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1419187/+subscriptions


References