Use consoleauth rpcapi in nova-novncproxy.
The nova-novncproxy service was using rpc.call directly when it should have been going through the rpcapi client proxy class. This patch fixes that. Fix bug 1067858. Change-Id: I626fb01ff61ff507520d528122358ef687d297b7
This commit is contained in:
@@ -28,6 +28,7 @@ import sys
|
||||
|
||||
import websockify
|
||||
|
||||
from nova.consoleauth import rpcapi as consoleauth_rpcapi
|
||||
from nova import context
|
||||
from nova import flags
|
||||
from nova.openstack.common import cfg
|
||||
@@ -84,9 +85,8 @@ class NovaWebSocketProxy(websockify.WebSocketProxy):
|
||||
cookie.load(self.headers.getheader('cookie'))
|
||||
token = cookie['token'].value
|
||||
ctxt = context.get_admin_context()
|
||||
connect_info = rpc.call(ctxt, 'consoleauth',
|
||||
{'method': 'check_token',
|
||||
'args': {'token': token}})
|
||||
rpcapi = consoleauth_rpcapi.ConsoleAuthAPI()
|
||||
connect_info = rpcapi.check_token(ctxt, token=token)
|
||||
|
||||
if not connect_info:
|
||||
LOG.audit("Invalid Token: %s", token)
|
||||
|
||||
Reference in New Issue
Block a user