diff options
author | Balazs Gibizer <balazs.gibizer@est.tech> | 2019-08-23 15:51:34 +0200 |
---|---|---|
committer | Balazs Gibizer <balazs.gibizer@est.tech> | 2019-11-27 16:24:35 +0000 |
commit | 26d4047e17eba9bc271f8868f1d0ffeec97b555e (patch) | |
tree | c51b7081322c7a8e4f927809677b9bd40c2b3e2f /nova/console/websocketproxy.py | |
parent | 23995b4f9945aa242f6a9e7bd5bc700c27f31eb2 (diff) | |
download | nova-26d4047e17eba9bc271f8868f1d0ffeec97b555e.tar.gz |
Mask the token used to allow access to consoles
Hide the novncproxy token from the logs.
When backported this patch needs to be extended to handle the same issue
in the consoleauth service.
Co-Authored-By:paul-carlton2 <paul.carlton2@hp.com>
Co-Authored-By:Tristan Cacqueray <tdecacqu@redhat.com>
Change-Id: I5b8fa4233d297722c3af08176901d12887bae3de
Closes-Bug: #1492140
Diffstat (limited to 'nova/console/websocketproxy.py')
-rw-r--r-- | nova/console/websocketproxy.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/console/websocketproxy.py b/nova/console/websocketproxy.py index 4d79f40c7f..e13b3c0fe1 100644 --- a/nova/console/websocketproxy.py +++ b/nova/console/websocketproxy.py @@ -18,6 +18,7 @@ Websocket proxy that is compatible with OpenStack Nova. Leverages websockify.py by Joel Martin ''' +import copy import socket import sys @@ -220,7 +221,10 @@ class NovaProxyRequestHandlerBase(object): detail = _("Origin header protocol does not match this host.") raise exception.ValidationError(detail=detail) - self.msg(_('connect info: %s'), str(connect_info)) + sanitized_info = copy.copy(connect_info) + sanitized_info.token = '***' + self.msg(_('connect info: %s'), sanitized_info) + host = connect_info.host port = connect_info.port |