using glance with token auth doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
install devstack then source openrc
This sets:
declare -x OS_AUTH_URL="http://
declare -x OS_PASSWORD=
declare -x OS_TENANT_
declare -x OS_USERNAME="admin"
from here you should be able to get a token and use it directly with services.
$ keystone token-get
+--
| Property | Value |
+--
| expires | 2012-02-
| id | 111f6974cfdb4a7
| tenant | 53d16bbf4f1e452
+--
$ glance -A 111f6974cfdb4a7
Failed to show index. Got error:
Internal Server error: Traceback (most recent call last):
File "/usr/lib/
result = self.applicatio
File "/usr/lib/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/
return self.func(req, *args, **kwargs)
File "/opt/stack/
response = req.get_
File "/usr/lib/
application, catch_exc_
File "/usr/lib/
app_iter = application(
File "/opt/stack/
valid = self._validate_
File "/opt/stack/
self.
File "/opt/stack/
return json.loads(
KeyError: 'access'
From the service side we see keystone attempting to validate the token:
2012-02-28 13:28:54 DEBUG [root] *******
2012-02-28 13:28:54 DEBUG [root] SCRIPT_NAME = /v2.0
2012-02-28 13:28:54 DEBUG [root] webob.adhoc_attrs = {'response': <Response at 0x429ef50 200 OK>}
2012-02-28 13:28:54 DEBUG [root] REQUEST_METHOD = POST
2012-02-28 13:28:54 DEBUG [root] PATH_INFO = /tokens
2012-02-28 13:28:54 DEBUG [root] SERVER_PROTOCOL = HTTP/1.0
2012-02-28 13:28:54 DEBUG [root] CONTENT_LENGTH = 94
2012-02-28 13:28:54 DEBUG [root] eventlet.posthooks = []
2012-02-28 13:28:54 DEBUG [root] SERVER_NAME = 50.56.12.206
2012-02-28 13:28:54 DEBUG [root] REMOTE_ADDR = 50.56.12.206
2012-02-28 13:28:54 DEBUG [root] eventlet.input = <eventlet.
2012-02-28 13:28:54 DEBUG [root] wsgi.url_scheme = http
2012-02-28 13:28:54 DEBUG [root] SERVER_PORT = 35357
2012-02-28 13:28:54 DEBUG [root] wsgi.input = <_io.BytesIO object at 0x4147ef0>
2012-02-28 13:28:54 DEBUG [root] HTTP_HOST = 50.56.12.206:35357
2012-02-28 13:28:54 DEBUG [root] wsgi.multithread = True
2012-02-28 13:28:54 DEBUG [root] openstack.params = {u'auth': {u'tenantName': u'admin', u'passwordCrede
2012-02-28 13:28:54 DEBUG [root] HTTP_ACCEPT = application/json
2012-02-28 13:28:54 DEBUG [root] wsgi.version = (1, 0)
2012-02-28 13:28:54 DEBUG [root] openstack.context = {'token_id': None, 'is_admin': False}
2012-02-28 13:28:54 DEBUG [root] GATEWAY_INTERFACE = CGI/1.1
2012-02-28 13:28:54 DEBUG [root] wsgi.run_once = False
2012-02-28 13:28:54 DEBUG [root] wsgi.errors = <open file '<stderr>', mode 'w' at 0x7f94a19cd270>
2012-02-28 13:28:54 DEBUG [root] wsgi.multiprocess = False
2012-02-28 13:28:54 DEBUG [root] webob.is_
2012-02-28 13:28:54 DEBUG [root] CONTENT_TYPE = application/json
2012-02-28 13:28:54 DEBUG [root] HTTP_ACCEPT_
2012-02-28 13:28:54 DEBUG [root]
2012-02-28 13:28:54 DEBUG [root] *******
2012-02-28 13:28:54 DEBUG [root] {"auth": {"tenantName": "admin", "passwordCreden
2012-02-28 13:28:54 DEBUG [root]
2012-02-28 13:28:54 DEBUG [routes.middleware] Matched POST /tokens
2012-02-28 13:28:54 DEBUG [routes.middleware] Route path: '{path_info:.*}', defaults: {'controller': <keystone.
2012-02-28 13:28:54 DEBUG [routes.middleware] Match dict: {'controller': <keystone.
2012-02-28 13:28:54 DEBUG [routes.middleware] Matched POST /tokens
2012-02-28 13:28:54 DEBUG [routes.middleware] Route path: '{path_info:.*}', defaults: {'controller': <keystone.
2012-02-28 13:28:54 DEBUG [routes.middleware] Match dict: {'controller': <keystone.
2012-02-28 13:28:54 DEBUG [routes.middleware] Matched POST /tokens
2012-02-28 13:28:54 DEBUG [routes.middleware] Route path: '/tokens', defaults: {'action': u'authenticate', 'controller': <keystone.
2012-02-28 13:28:54 DEBUG [routes.middleware] Match dict: {'action': u'authenticate', 'controller': <keystone.
2012-02-28 13:28:54 DEBUG [root] arg_dict: {}
/opt/stack/
raise exception.
2012-02-28 13:28:54 WARNING [root] Invalid user / password
2012-02-28 13:28:54 DEBUG [root] *******
2012-02-28 13:28:54 DEBUG [root] Content-Type = application/json
2012-02-28 13:28:54 DEBUG [root] Vary = X-Auth-Token
2012-02-28 13:28:54 DEBUG [root] Content-Length = 89
2012-02-28 13:28:54 DEBUG [root]
2012-02-28 13:28:54 DEBUG [root] *******
2012-02-28 13:28:54 DEBUG [root] {"error": {"message": "Invalid user / password", "code": 401, "title": "Not Authorized"}}
2012-02-28 13:28:54 DEBUG [eventlet.
For completeness:
$ keystone tenant-list
No handlers could be found for logger "keystoneclient .v2_0.client" ------- ------- ------- ------- +------ -+----- ----+ ------- ------- ------- ------- +------ -+----- ----+ 9926e17431b3dbe 96 | demo | True | a845182a61d313d 00 | admin | True | ------- ------- ------- ------- +------ -+----- ----+
+------
| id | name | enabled |
+------
| 1febdaa3998b424
| 53d16bbf4f1e452
+------