[openstack-dev] [Neutron] Auth token in context
joehuang
joehuang at huawei.com
Fri Jul 18 07:03:47 UTC 2014
Hello, Phillip.
Currently, Neutron did not pass the token to the context. But Nova/Cinder did that. It's easy to do that, just 'copy' from Nova/Cinder.
1. How Nova/Cinder did that
class NovaKeystoneContext(wsgi.Middleware)
///or CinderKeystoneContext for cinder
auth_token = req.headers.get('X_AUTH_TOKEN',
req.headers.get('X_STORAGE_TOKEN'))
ctx = context.RequestContext(user_id,
project_id,
user_name=user_name,
project_name=project_name,
roles=roles,
auth_token=auth_token,
remote_address=remote_address,
service_catalog=service_catalog)
2. Neutron not passed token. Also not good for the third part network infrastructure to integrate the authentication with KeyStone.
class NeutronKeystoneContext(wsgi.Middleware)
.................
##### token not get from the header and not passed to context. Just change here like what Nova/Cinder did.
context.Context(user_id, tenant_id, roles=roles,
user_name=user_name, tenant_name=tenant_name,
request_id=req_id)
req.environ['neutron.context'] = ctx
I think I'd better to report a bug for your case.
Best Regards
Chaoyi Huang ( Joe Huang )
-----邮件原件-----
发件人: Phillip Toohill [mailto:phillip.toohill at RACKSPACE.COM]
发送时间: 2014年7月18日 14:07
收件人: OpenStack Development Mailing List (not for usage questions)
主题: [openstack-dev] [Neutron] Auth token in context
Hello all,
I am wondering how to get the auth token from a user request passed down to the context so it can potentially be used by the plugin or driver?
Thank you
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
More information about the OpenStack-dev
mailing list