RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1792231 - Spice connection through ovirt:// fails when engine uses externally issued certificate
Summary: Spice connection through ovirt:// fails when engine uses externally issued ce...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libgovirt
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Eduardo Lima (Etrunko)
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On: 1402909 1403161 1837489
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-17 10:42 UTC by Radek Duda
Modified: 2020-11-04 03:03 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1402909
Environment:
Last Closed: 2020-11-04 03:03:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Radek Duda 2020-01-17 10:42:02 UTC
Cloned also for rhel8.2 client where reproduced:

virt-viewer-7.0-9.el8.x86_64
libgovirt-0.3.4-9.el8.x86_64
spice-gtk3-0.37-1.el8.x86_64

+++ This bug was initially created as a clone of Bug #1402909 +++

Description of problem:
I can't dig this old issue form BZ so I'm reposting it again: when HTTP server of ovirt-engine uses certificate not signed engine's CA, the engine's CA has to be passed to remote-viewer via --spice-ca-file in spite of the engine CA being available in the very API where libgovirt gets all the rest of connection information. The location of CA certificate in engine is (from [1]):
/ovirt-engine/services/pki-resource?resource=ca-certificate

The engine CA is available in this location since at least 3.5 so we can never mind the old location of /ca.crt

[1] https://www.ovirt.org/develop/release-management/features/infra/pki/#services

Version-Release number of selected component (if applicable):
libgovirt-0.3.3-4.el7.x86_64
virt-viewer-2.0-12.el7.x86_64
spice-gtk3-0.31-6.el7_3.2.x86_64

How reproducible:
always

Steps to Reproduce:
1. have engine with HTTP CA different to engine CA
2. connect using ovirt:// uri to some VM without specifying engine CA:
remote-viewer [--ovirt-ca-file external-ca.pem] ovirt://example.com/VM
3. 

Actual results:
* spice-gtk fails to verify TLS certificate of spice-server
* HTTP log on engine doesn't indicate access to /ovirt-engine/services/pki-resource?resource=ca-certificate

Expected results:
* certificate is downloaded
* client connects just fine

Additional info:

--- Additional comment from Christophe Fergeau on 2016-12-09 11:20:05 CET ---

Tried to improve this, hit this ovirt bug: https://bugzilla.redhat.com/show_bug.cgi?id=1403161
I believe virt-viewer would need something like

diff --git a/src/remote-viewer.c b/src/remote-viewer.c
index 6d29bf2..e029e4c 100644
--- a/src/remote-viewer.c
+++ b/src/remote-viewer.c
@@ -969,7 +969,14 @@ create_ovirt_session(VirtViewerApp *app, const char *uri, GError **err)
                      "cert-subject", host_subject,
                      "proxy", proxy_url,
                      NULL);
-        g_object_get(G_OBJECT(proxy), "ca-cert", &ca_cert, NULL);
+        g_object_get(G_OBJECT(display), "ca-cert", &ca_cert, NULL);
+        g_warning("OvirtVmDisplay::ca-cert %p", ca_cert);
+        if (ca_cert == NULL) {
+            g_object_get(G_OBJECT(proxy), "ca-cert", &ca_cert, NULL);
+                g_object_set(G_OBJECT(session),
+                    "ca", ca_cert,
+                    NULL);
+        }
         if (ca_cert != NULL) {
             g_object_set(G_OBJECT(session),
                     "ca", ca_cert,

but I've been unable to test this.

--- Additional comment from Eduardo Lima (Etrunko) on 2017-11-17 19:44:18 CET ---

Moving to 7.6

--- Additional comment from Victor Toso on 2018-12-13 16:50:20 CET ---

Doing triage, quick note is that I vote to keep this in 7.7 as virt-viewer side seems fine as per comment #1
Only needs the fix from bug 1403161 ~ feel free to correct me if I'm wrong.

--- Additional comment from Victor Toso on 2019-04-01 15:52:26 CEST ---

Bug 1403161 is fixed with ovirt-engine-4.3.2.1

--- Additional comment from Eduardo Lima (Etrunko) on 2019-10-04 20:37:11 CEST ---

Patch submitted for review. Requires changes in libgovirt as well.

https://www.redhat.com/archives/virt-tools-list/2019-October/msg00007.html

--- Additional comment from errata-xmlrpc on 2019-10-11 22:28:08 CEST ---

Bug report changed to ON_QA status by Errata System.
A QE request has been submitted for advisory RHBA-2019:47221-01
https://errata.devel.redhat.com/advisory/47221

--- Additional comment from Eduardo Lima (Etrunko) on 2019-10-11 22:53:17 CEST ---

libgovirt build https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=24021923
virt-viewer scratch build https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=24022442

Waiting for libgovirt package make to the buildroot to roll out final virt-viewer build.

David, can you help tagging the libgovirt package?

--- Additional comment from errata-xmlrpc on 2019-11-18 15:55:42 CET ---

Bug report changed from ON_QA to VERIFIED status by the Errata System: 
Advisory RHBA-2019:47221-03: 
Changed by: Radek Duda (rduda)
https://errata.devel.redhat.com/advisory/47221

Verified with libgovirt-0.3.4-4.el7
and virt-viewer-5.0-17.el7,
spice-gtk3-0.35-5.el7

using rhv43.spice.brq.redhat.com with external certificate http://spice-qe.ams2.redhat.com/misc/spice-qe-idm.pem

remote-viewer ovirt://$USERNAME%40$DOMAIN.brq.redhat.com/$VM_NAME does the job

Comment 6 errata-xmlrpc 2020-11-04 03:03:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (libgovirt bug fix and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2020:4691


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