← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1343854] Re: Missing token in Neutron context but Nova/Cinder context has

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1343854

Title:
  Missing token in Neutron context but Nova/Cinder context has

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  Missing token in Neutron context but Nova/Cinder context has.  Store
  the toke into the context can make the third party plugin or driver
  integrate the authentication with KeyStone.

  And Phillip Toohill [mailto:phillip.toohill@xxxxxxxxxxxxx] also ask
  for that.

  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1343854/+subscriptions


References