able to create two users with the same name in the same domain with sqlite
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Invalid
|
Low
|
Unassigned |
Bug Description
Looks like we can create two different users with the same name in the same domain. That should not be allowed.
gyee@gyee-
{
"domain": {
"enabled": true,
"id": "ebf7d50dbba54e
"links": {
"self": "http://
},
"name": "test-domain"
}
}
gyee@gyee-
{
"user": {
"enabled": true,
"id": "375ac107d36247
"links": {
"self": "http://
},
"name": "jacksquat"
}
}
gyee@gyee-
{
"user": {
"enabled": true,
"id": "c3bd426062d243
"links": {
"self": "http://
},
"name": "jacksquat"
}
}
Now try to authenticate the user and obviously it will fail.
gyee@gyee-
{
"error": {
"code": 500,
"message": "An unexpected error prevented the server from fulfilling your request.",
"title": "Internal Server Error"
}
}
summary: |
- able to create two users with the same name in the same domain + able to create two users with the same name in the same domain with + sqlite |
Changed in keystone: | |
importance: | High → Low |
status: | Incomplete → Triaged |
tags: | removed: icehouse-rc-potential |
Changed in keystone: | |
assignee: | nobody → Akshay (akshay-onweb) |
Changed in keystone: | |
assignee: | Akshay (akshay-onweb) → nobody |
tags: | added: sql validation |
tags: | added: sqlite |
Stacktrace from the backend when authenticating the user
2014-04-07 14:22:50.595 11069 ERROR keystone. common. wsgi [-] Multiple rows were found for one() common. wsgi Traceback (most recent call last): common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ common/ wsgi.py" , line 207, in __call__ common. wsgi result = method(context, **params) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ auth/controller s.py", line 323, in authenticate_ for_token common. wsgi self.authentica te(context, auth_info, auth_context) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ auth/controller s.py", line 423, in authenticate common. wsgi auth_context) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ auth/plugins/ password. py", line 111, in authenticate common. wsgi user_info = UserAuthInfo. create( auth_payload) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ auth/plugins/ password. py", line 31, in create common. wsgi user_auth_ info._validate_ and_normalize_ auth_data( auth_payload) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ auth/plugins/ password. py", line 89, in _validate_ and_normalize_ auth_data common. wsgi user_name, domain_ref['id']) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ identity/ core.py" , line 184, in wrapper common. wsgi return f(self, *args, **kwargs) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ identity/ core.py" , line 310, in get_user_by_name common. wsgi ref = driver. get_user_ by_name( user_name, domain_id) common. wsgi File "/home/ gyee/projects/ openstack/ keystone/ keystone/ identity/ backends/ sql.py" , line 143, in get_user_by_name common. wsgi user_ref = query.one() common. wsgi File "/usr/local/ lib/python2. 7/dist- packages/ sqlalchemy/ orm/query. py", line 2370, in one common. wsgi "Multiple rows were found for one()") common. wsgi MultipleResults Found: Multiple rows were found for one() common. wsgi
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.
2014-04-07 14:22:50.595 11069 TRACE keystone.