500 Returned when trying to PUT /users/<USER_ID>/enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Undecided
|
Jay Pipes |
Bug Description
When tracking down bug #1018635, I'm getting a 500 from Keystone:
=======
ERROR: Disabled user's token should not get authenticated
-------
Traceback (most recent call last):
File "/home/
self.
File "/home/
self.
File "/home/
put_body, self.headers)
File "/home/
return self.request('PUT', url, headers, body)
File "/home/
raise exceptions.
IdentityError: Got identity error
Details: An unexpected error prevented the server from fulfilling your request. 'id'
Looking at a log from Keystone during test:
http://
We see the following traceback:
Traceback (most recent call last):
File "/opt/stack/
result = method(context, **params)
File "/opt/stack/
return self.update_
File "/opt/stack/
user_ref = self.identity_
File "/opt/stack/
return f(*args, **kw)
File "/opt/stack/
return method(*args, **kwargs)
File "/opt/stack/
if user_id != user['id']:
KeyError: 'id'
The JSON being sent in the request is the following:
{'enabled': false}
It seems that the router in Keystone is routing requests for PUT /users/
@handle_
def update_user(self, user_id, user):
session = self.get_session()
if user_id != user['id']:
raise exception.
I believe the solution should be to check to see if the user dict supplied to update_user() actually contains an 'id' key before checking it against the supplied user_id param.
Changed in keystone: | |
milestone: | none → folsom-3 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | folsom-3 → 2012.2 |
Fix proposed to branch: master /review. openstack. org/9500
Review: https:/