Spice console isn't working when ssl_only=True is set

Bug #1259760 reported by Nerijus Bendziunas
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Incomplete
Low
Unassigned
OpenStack Nova Cloud Controller Charm
Invalid
Undecided
Unassigned
Ubuntu Cloud Archive
Fix Released
Undecided
Unassigned
Queens
Fix Released
High
Unassigned
spice-html5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

OpenStack instalation: 2013.2
OS: Ubuntu 13.10
Repo: standart Ubuntu repozitory

When using ssl_only in nova.conf, browser gets error:
[Exception... "The operation is insecure." code: "18" nsresult: "0x80530012 (SecurityError)" location: "https://api.region.domain.tld:6082/spiceconn.js Line: 34"]

Problem: trying to reach using ws:// schema, not wss://.

Temporary fixed changing /usr/share/spice-html5/spice_auto.html scheme = "wss://" at 82th line.

Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

CONFIRMED FOR: MITAKA

stgleb (gstepanov)
Changed in nova:
assignee: nobody → stgleb (gstepanov)
Revision history for this message
Andrea Rosa (andrea-rosa-m) wrote :

@stgleb if you are working on this bug, please mark it as "in progress", thanks.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Ah, I had almost forgotten about this bug. What we did in our deployment to fix it, is create a copy of /usr/share/spice-html5/spice_auto.html like e.g. /usr/share/spice-html5/spice_sec_auto.html and apply the change from "ws://" to "wss://" in that file.

Then reference the new file in the nova.conf, like

[spice]
html5proxy_base_url = https://myspiceproxy.com:6082/spice_sec_auto.html

So IMHO this is not a bug for nova, but rather for the spice-html5 package to not provide an option to use the secure websocket scheme.

Revision history for this message
stgleb (gstepanov) wrote :

Where exactly have you changed that? I see switching from ws: to wss: protocol in spice_auth.html.
Could you give and example of your spice_sec_auto.html that solves this problem?

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

$ diff -u /usr/share/spice-html5/spice_auto.html /usr/share/spice-html5/spice_sec_auto.html
--- /usr/share/spice-html5/spice_auto.html 2013-09-19 16:10:02.000000000 +0000
+++ /usr/share/spice-html5/spice_sec_auto.html 2016-08-08 07:52:57.641411769 +0000
@@ -81,7 +81,7 @@

             function connect()
             {
- var host, port, password, scheme = "ws://", uri;
+ var host, port, password, scheme = "wss://", uri;

                 // By default, use the host and port of server that served this file
                 host = spice_query_var('host', window.location.hostname);

Revision history for this message
Mike Dorman (mdorman-m) wrote :

Newer versions of spice-html5 fix this, it autodetects the proper protocol. See https://cgit.freedesktop.org/spice/spice-html5/tree/spice_auto.html#n94

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Thanks for the hint Mike, I must admit that I never looked at that. In fact it seems like this would be fixed already in spice-html5-0.1.5 dated more than two years ago, but Ubuntu still ships 0.1.4.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in spice-html5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Sean Dague (sdague) wrote :

It seems that there is no nova fix, just need new spice html5

Changed in nova:
status: In Progress → Incomplete
assignee: stgleb (gstepanov) → nobody
Revision history for this message
Drew Freiberger (afreiberger) wrote :

This is a valid bug for cloud:xenial-queens UCA pocket.

I've tested that the fix for this issue is included in the bionic repositories in version 0.1.7-2ubuntu1.

spice-html5 0.1.7-2ubuntu1

I'm requesting this to be backported into the xenial-queens cloud archive.

Changed in spice-html5 (Ubuntu):
status: Confirmed → Fix Released
Changed in cloud-archive:
status: New → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Drew, or anyone else affected,

Accepted spice-html5 into queens-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:queens-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-queens-needed to verification-queens-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-queens-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-queens-needed
no longer affects: cloud-archive/mitaka
Changed in cloud-archive:
importance: Undecided → High
importance: High → Undecided
Changed in charm-nova-cloud-controller:
status: New → Invalid
Revision history for this message
Adam Dyess (addyess) wrote :

We have updated to this version 0.1.7-2ubuntu1~cloud0 like so
  sudo add-apt-repository cloud-archive:queens-proposed
  # (press enter to accept the repository)
  sudo apt-get update
  sudo apt-get install spice-html5
  sudo systemctl restart nova-spiceproxy.service
  sudo rm /etc/apt/sources.list.d/cloudarchive-queens-proposed.list
  sudo apt-get update

$dpkg -l spice-html
  0.1.7-2ubuntu1~cloud0

this successfully address the issue

tags: added: verification-queens-done
removed: verification-queens-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.