Bug 1855249 - noVNC console via websocket with separated host doesn't work in chrome
Summary: noVNC console via websocket with separated host doesn't work in chrome
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.EngineCommon
Version: 4.4.1.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.4.3
: 4.4.3.3
Assignee: Yedidyah Bar David
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-09 11:03 UTC by Guilherme Santos
Modified: 2020-11-11 06:51 UTC (History)
5 users (show)

Fixed In Version: ovirt-engine-4.4.3.3
Doc Type: Bug Fix
Doc Text:
Previously, when engine-setup was running on a separate machine (from the engine) and created a certificate for websocket-proxy or for grafana, this certificate was created without the extension "Subject Alternate Name". This causes problems with recent versions of browsers. This release fixes this issue - when engine-setup needs to create such a certificate, it creates it with this extension included.
Clone Of:
Environment:
Last Closed: 2020-11-11 06:42:45 UTC
oVirt Team: Integration
Embargoed:
pm-rhel: ovirt-4.4+
pm-rhel: planning_ack+
sbonazzo: devel_ack+
lleistne: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 111099 0 master MERGED packaging: setup: remote_engine: Add SubjectAltName 2021-01-05 18:07:48 UTC

Description Guilherme Santos 2020-07-09 11:03:43 UTC
Description of problem:
After installing websocket in a different host and trying to access the noVNC console, it fails in Google Chrome browser.
The console doesn't fail in firefox. 
the engine certificate have been added the both browsers beforehand.
Checking the logs is possible to see issues with ssl authentication:

Accessing via firefox:
ovirt-websocket-proxy[11146] INFO log_message:117 10.40.192.25 - - [09/Jul/2020 12:00:33] x.x.x.x - - [09/Jul/2020 12:00:33] Not a SSL connection, falling back to standard Websockify connection handling
ovirt-websocket-proxy[11146] INFO log_message:117 x.x.x.x - - [09/Jul/2020 12:00:33] connecting to: b'y.y.y.y':b'5902'
ovirt-websocket-proxy: INFO  log_message:117 x.x.x.x - - [09/Jul/2020 12:00:33] connecting to: b'y.y.y.y':b'5902'

Accessing via chrome:
ovirt-websocket-proxy[11161] INFO msg:887 handler exception:  [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:897)

Version-Release number of selected component (if applicable):
4.4.1

How reproducible:
100%

Steps to Reproduce:
1. Install engine without websocket on engine A
2. Install websocket on engine B
3. Trusted the engine A certificate in the browser
4. Accessed a noVNC console in engine A

Actual results:
ssl error

Expected results:
no error

Additional info:
x.x.x.x and y.y.y.y are obfuscated ip addresses

Comment 1 Arik 2020-07-09 15:02:21 UTC
Beni, do we have this covered in the tests? I want to rule out an environment issue

Comment 3 Guilherme Santos 2020-07-10 13:47:04 UTC
Also want to complement that when the websocket is running in the same host as the engine, it works on chrome (as well as firefox)
Logs attached.

Comment 5 Arik 2020-07-20 11:38:10 UTC
Did you set it up with engine-setup as described in:
https://www.ovirt.org/develop/release-management/features/integration/websocketproxy-on-a-separate-host.html

Comment 6 Guilherme Santos 2020-07-27 15:27:34 UTC
Yes Arik

Comment 7 Arik 2020-07-27 19:15:19 UTC
And does it work if you change 'wss' to 'ws' in ./usr/share/ovirt-engine/engine.ear/services.war/novnc-main.jsp ?

Comment 8 Arik 2020-07-27 19:15:47 UTC
(might require to restart the engine)

Comment 9 Tomáš Golembiovský 2020-08-18 11:20:45 UTC
I was able to reproduce this and it looks like Chrome is rejecting certificate from websocket proxy even if engine CA certificate is properly installed in the system.

Comment 10 Tomáš Golembiovský 2020-08-18 13:06:14 UTC
Since v58 Chromium does not look at Common Name in certificates but compares host names only to the names in Subjet Alternative Names section. When engine-setup generates the certificate for websocket proxy it does not add the SAN section with hostname.

Comment 11 Yedidyah Bar David 2020-08-20 08:45:11 UTC
It's not specific to websocket-proxy, affects all separate machine pki (meaning, currently, also grafana). The bug is that we do not pass --san to the call to pki-enroll-request in engine:packaging/setup/ovirt_engine_setup/remote_engine.py

Comment 12 Guilherme Santos 2020-10-26 20:16:49 UTC
Verified on:
ovirt-engine-4.4.3.8-0.1.el8ev.noarch
ovirt-engine-websocket-proxy-4.4.3.8-0.1.el8ev.noarch

Steps:
1. Install engine without websocket on engine A
2. Install websocket on engine B
3. Trusted the engine A certificate in the browser
4. Accessed a noVNC console in engine A UI via chrome

Results:
console successfully accessed on chrome

Comment 13 Sandro Bonazzola 2020-11-11 06:42:45 UTC
This bugzilla is included in oVirt 4.4.3 release, published on November 10th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.3 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.