yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07063
[Bug 1259440] [NEW] Cannot get info of a trust use admin_token
Public bug reported:
Hi all.
When I test the lastest code of master, I found the following bugs:
If I use admin_token whitch is in the keystone.conf to access some V3 apis of trust, I will get this error message: '{"error": {"message": "Could not find token, tokentoken.", "code": 404, "title": "Not Found"}}'.
The apis are as follow:
curl -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12
curl -X DELETE -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12
curl -X HEAD -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12/roles/4238a14d2fd34cf68e8f1ae7f2fb8f8a
curl -i -X GET -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12/roles
The reason is that the function named "_get_user_id" in the file of
"trust.controllers.py" will try to get token info from context. Because
admin_token is not in db, a 404 exception will be raised.
def _get_user_id(self, context):
if 'token_id' in context:
token_id = context['token_id']
token = self.token_api.get_token(token_id)
user_id = token['user']['id']
return user_id
return None
** Affects: keystone
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1259440
Title:
Cannot get info of a trust use admin_token
Status in OpenStack Identity (Keystone):
New
Bug description:
Hi all.
When I test the lastest code of master, I found the following bugs:
If I use admin_token whitch is in the keystone.conf to access some V3 apis of trust, I will get this error message: '{"error": {"message": "Could not find token, tokentoken.", "code": 404, "title": "Not Found"}}'.
The apis are as follow:
curl -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12
curl -X DELETE -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12
curl -X HEAD -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12/roles/4238a14d2fd34cf68e8f1ae7f2fb8f8a
curl -i -X GET -H "X-Auth-Token:tokentoken" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/OS-TRUST/trusts/2a096d2e24f54429a744e388fa292c12/roles
The reason is that the function named "_get_user_id" in the file of
"trust.controllers.py" will try to get token info from context.
Because admin_token is not in db, a 404 exception will be raised.
def _get_user_id(self, context):
if 'token_id' in context:
token_id = context['token_id']
token = self.token_api.get_token(token_id)
user_id = token['user']['id']
return user_id
return None
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1259440/+subscriptions
Follow ups
References