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 1346256 - two times authentication are required when connecting to vm by ovirt uri
Summary: two times authentication are required when connecting to vm by ovirt uri
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libgovirt
Version: 7.3
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Christophe Fergeau
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks: 1346261
TreeView+ depends on / blocked
 
Reported: 2016-06-14 11:27 UTC by Xiaodai Wang
Modified: 2016-11-04 01:21 UTC (History)
9 users (show)

Fixed In Version: libgovirt-0.3.3-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1346261 (view as bug list)
Environment:
Last Closed: 2016-11-04 01:21:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2229 0 normal SHIPPED_LIVE virt-viewer, libgovirt, spice-gtk, and usbredir bug fix and enhancement update 2016-11-03 13:26:58 UTC

Description Xiaodai Wang 2016-06-14 11:27:30 UTC
Description of problem:
two times authentication are required when connecting to vm by ovirt uri

Version-Release number of selected component (if applicable):
libgovirt-0.3.3-2.el7.x86_64
virt-viewer-2.0-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a running vm in ovirt 3.6.
2. Got the ca file from ovirt 3.6.
$ wget http://rhevm3.6-hp-dl360eg8-03/ca.crt
3. Connect the vm by remote-viewer with ovirt uri.
$ remote-viewer --ovirt-ca-file=ca.crt ovirt://rhevm3.6-hp-dl360eg8-03/$your_vm
4. An authentication dialog pops up, then type correct username and password and click OK.

Actual results:
an authentication dialog pops up again.

Expected results:
The second authentication is not necessary.

Additional info:
1) when the second authentication dialog pops up, click cancel button to cancel it directly, foreign menu can display correctly.
2) when the second authentication dialog pops up, type wrong password, then click OK, after authentication failed then click cancel button to cancel it, foreign menu can't display correctly.

Comment 1 Christophe Fergeau 2016-06-14 11:40:28 UTC
This is a regression introduced by the sso-token support patches, namely https://git.gnome.org/browse/libgovirt/commit/?id=d3683c20e62d889e187406b3fa3fe75e00df228d

The whole commit can probably be reverted without any bad side-effect for now. More work seems to be needed for proper RHEV 4.0 support anyway.

Comment 2 Christophe Fergeau 2016-06-14 11:48:49 UTC
The same issue is present in the zstream build made for bug #1344633

Comment 3 Christophe Fergeau 2016-06-14 12:03:37 UTC
(In reply to Christophe Fergeau from comment #1)

> The whole commit can probably be reverted without any bad side-effect for
> now. More work seems to be needed for proper RHEV 4.0 support anyway.

@@ -815,6 +812,7 @@ static void ovirt_proxy_set_sso_token(OvirtProxy *proxy, const char *sso_token)
     g_free(proxy->priv->sso_token);
     proxy->priv->sso_token = g_strdup(sso_token);

+    ovirt_proxy_add_header(proxy, "Prefer", NULL);
     header_value = g_strdup_printf("Bearer %s", sso_token);
     ovirt_proxy_add_header(proxy, "Authorization", header_value);
     g_free(header_value);


would probably be nice to have if the commit is reverted.

Comment 4 Christophe Fergeau 2016-06-14 13:28:21 UTC
https://git.gnome.org/browse/libgovirt/commit/?id=821c4c96edaeca300146137067533f86d6e0b065 upstream commit which should fix acceptably this problem. More work is needed in libgovirt upstream for persistent auth against rhev 4.0. The current way should work, but the recommended way is oAuth2 (I think).

Comment 6 Christophe Fergeau 2016-06-14 15:37:29 UTC
qa_ack+ was lost when I moved this bug, can I get it back?

Comment 7 tingting zheng 2016-06-15 03:11:47 UTC
(In reply to Christophe Fergeau from comment #1)
> This is a regression introduced by the sso-token support patches, namely
> https://git.gnome.org/browse/libgovirt/commit/
> ?id=d3683c20e62d889e187406b3fa3fe75e00df228d
> 
> The whole commit can probably be reverted without any bad side-effect for
> now. More work seems to be needed for proper RHEV 4.0 support anyway.

Does the commit affect zstream virt-viewer bug 1344635? If so,it needs a new build,thanks.

Comment 8 Christophe Fergeau 2016-06-15 08:09:07 UTC
(In reply to tingting zheng from comment #7)
> (In reply to Christophe Fergeau from comment #1)
> > This is a regression introduced by the sso-token support patches, namely
> > https://git.gnome.org/browse/libgovirt/commit/
> > ?id=d3683c20e62d889e187406b3fa3fe75e00df228d
> > 
> > The whole commit can probably be reverted without any bad side-effect for
> > now. More work seems to be needed for proper RHEV 4.0 support anyway.
> 
> Does the commit affect zstream virt-viewer bug 1344635? If so,it needs a new
> build,thanks.

Already done, https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=499139

Comment 12 errata-xmlrpc 2016-11-04 01:21:39 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, 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://rhn.redhat.com/errata/RHBA-2016-2229.html


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