Hide Forgot
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:
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.
Moving to 7.6
Bug 1403161 is fixed with ovirt-engine-4.3.2.1
Patch submitted for review. Requires changes in libgovirt as well. https://www.redhat.com/archives/virt-tools-list/2019-October/msg00007.html
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, 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:1170