← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1368046] [NEW] empty username/userid results in unhelpful error

 

Public bug reported:

If the username/userid is provided in the body but it is blank, an
sqlalchemy error is triggered from querying on an empty ID.


2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi Traceback (most recent call last):
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 212, in __call__
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     result = method(context, **params)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/token/controllers.py", line 98, in authenticate
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     context, auth)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/token/controllers.py", line 276, in _authenticate_local
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     password=password)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/notifications.py", line 253, in wrapper
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     result = f(wrapped_self, context, user_id, *args, **kwargs)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 189, in wrapper
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     return f(self, *args, **kwargs)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 281, in authenticate
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     ref = driver.authenticate(user_id, password)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/backends/sql.py", line 110, in authenticate
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     user_ref = self._get_user(session, user_id)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/backends/sql.py", line 136, in _get_user
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     user_ref = session.query(User).get(user_id)
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 799, in get
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     if len(ident) != len(mapper.primary_key):
2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi TypeError: object of type 'NoneType' has no len()

** Affects: keystone
     Importance: Undecided
     Assignee: Kevin Benton (kevinbenton)
         Status: In Progress

** Changed in: keystone
     Assignee: (unassigned) => Kevin Benton (kevinbenton)

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

Title:
  empty username/userid results in unhelpful error

Status in OpenStack Identity (Keystone):
  In Progress

Bug description:
  If the username/userid is provided in the body but it is blank, an
  sqlalchemy error is triggered from querying on an empty ID.

  
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi Traceback (most recent call last):
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 212, in __call__
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     result = method(context, **params)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/token/controllers.py", line 98, in authenticate
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     context, auth)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/token/controllers.py", line 276, in _authenticate_local
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     password=password)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/notifications.py", line 253, in wrapper
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     result = f(wrapped_self, context, user_id, *args, **kwargs)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 189, in wrapper
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     return f(self, *args, **kwargs)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 281, in authenticate
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     ref = driver.authenticate(user_id, password)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/backends/sql.py", line 110, in authenticate
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     user_ref = self._get_user(session, user_id)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/backends/sql.py", line 136, in _get_user
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     user_ref = session.query(User).get(user_id)
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 799, in get
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi     if len(ident) != len(mapper.primary_key):
  2014-09-10 20:00:24.996 1497 TRACE keystone.common.wsgi TypeError: object of type 'NoneType' has no len()

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


Follow ups

References