novnc - novncproxy_base_url changed to https and port to 443 = 'Invalid Token' - websocketproxy.py adds '/websockify' to token
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mirantis OpenStack |
Won't Fix
|
Medium
|
MOS Nova | ||
6.0.x |
Won't Fix
|
High
|
MOS Maintenance | ||
6.1.x |
Won't Fix
|
Medium
|
MOS Maintenance | ||
7.0.x |
Won't Fix
|
Medium
|
MOS Maintenance | ||
8.0.x |
Won't Fix
|
Medium
|
MOS Nova | ||
9.x |
Invalid
|
Medium
|
Timur Nurlygayanov |
Bug Description
Fuel 6.0
Customer tried to enable SSL termination on haproxy for all services, haproxy is configured to listen on 443 and redirect all 80 to 443, ACLs are used to redirect traffic to proper backends. Every backend except novncproxy works properly.
novncproxy_base_url is modified on computes to use https:
from "http://
to "https:/
Result:
/var/log/
2015-10-
/var/log/
2015-10-
2015-10-
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
2015-10-05 23:23:42.578 108841 TRACE nova.console.
The issue happens In /usr/lib/
token = urlparse.
Will return <TOKEN>/websockify, so token will be concatenated with /websockify text, and cannot be validated.
The workaround I used to fix was to add an extra line:
token = token.split('/')[0]
After this change noVNC starts working well over https.
Also found a related bug - https:/
description: | updated |
description: | updated |
description: | updated |
Changed in mos: | |
status: | Confirmed → Won't Fix |
tags: | added: wontfix-feature |
Additionally it is necessary to uncomment 'novncproxy_ base_url' on controllers and configure it to be the same as on computes (it should start with "https://") and restart nova-novncproxy services. If this is not done, the following error will be observed in logs:
ValidationError: Origin header protocol does not match this host.
This workaround was found here - https:/ /bugzilla. redhat. com/show_ bug.cgi? id=1204482# c9