Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1061826 - RFE: use username:pass in ovirt:// uris (such as ovirt://user:pass@rhev.example.org/)
Summary: RFE: use username:pass in ovirt:// uris (such as ovirt://user:pass@rhev.examp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-viewer
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Jonathon Jongsma
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-05 17:23 UTC by David Jaša
Modified: 2015-03-05 13:38 UTC (History)
11 users (show)

Fixed In Version: virt-viewer-0.6.0-5.el7
Doc Type: Enhancement
Doc Text:
Feature: Allow user to pass username through an ovirt:// URI specified on the command line instead of having to type it in the authentication dialog which shows up later
Clone Of:
Environment:
Last Closed: 2015-03-05 13:38:47 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0295 normal SHIPPED_LIVE virt-viewer bug fix and enhancement update 2015-03-05 17:33:00 UTC

Description David Jaša 2014-02-05 17:23:58 UTC
Description of problem:
when using remote-viewer with ovirt:// uris, user has to type long usernames frequently. It would be nice to give them possibility to specify usernames including @ sign on CLI. URI format in general does support usernames:
protocol://[user[:password]@]hostname[:/port]/[path][&query]
so it would be natural to specify username there. OTOH password should not be accepted from command line in general, leaving in remote-viewer/ovirt case:
ovirt://[user-that_can_contain_@_sign@]hostname[:https_port]/vm_name

Version-Release number of selected component (if applicable):
virt-viewer-0.5.7-5.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. remote-viewer ovirt://user@ldap_or_ipa_or_ad.example.org@rhevm.example.org/VM
2.
3.

Actual results:
"cannot determine connection type from uri" error is returned

Expected results:
remote-viewer picks up the 'user@ldap_or_ipa_or_ad.example.org' part of string and prefills User in username/password dialog

Additional info:

Comment 1 Daniel Berrange 2014-02-05 17:38:11 UTC
NB, if the username contains a '@' that has to be escaped as '%40' since '@' is a reserved character used as the separator.

Comment 2 Marc-Andre Lureau 2014-07-02 15:22:10 UTC
David, the URI is parsed with '%40' instead of @. Could you verify with a ovirt instance?

Comment 3 David Jaša 2014-07-03 07:45:40 UTC
(In reply to Marc-Andre Lureau from comment #2)
> David, the URI is parsed with '%40' instead of @. Could you verify with a
> ovirt instance?

The uri is indeed parsed but the username is not passed further.

Tested on RHEL7:
libgovirt-0.1.0-3.el7.x86_64
virt-viewer-0.5.7-7.el7.x86_64
spice-gtk3-0.20-8.el7.x86_64

Comment 4 Marc-Andre Lureau 2014-07-03 09:35:45 UTC
(In reply to David Jaša from comment #3)
> (In reply to Marc-Andre Lureau from comment #2)
> > David, the URI is parsed with '%40' instead of @. Could you verify with a
> > ovirt instance?
> 
> The uri is indeed parsed but the username is not passed further.

Ok, could you change the bug description then, or open a different bug? I guess none of user:password is used atm. thanks

Comment 5 David Jaša 2014-07-03 11:24:34 UTC
Summary updated. Description can not be updated unfortunately...

Comment 6 Marc-Andre Lureau 2014-07-03 11:25:59 UTC
(In reply to David Jaša from comment #5)
> Summary updated. Description can not be updated unfortunately...

by parsing, I guess you mean "use", afaik parsing is fine

Comment 7 David Jaša 2014-07-04 11:54:45 UTC
> → RFE: user username:pass in ovirt:// uris (such as ovirt://user:pass@rhev.example.org/)

So you want to use password from CLI as well? It's convenient for testing but otherwise it's more of a security risk

Comment 8 Marc-Andre Lureau 2014-07-04 12:18:44 UTC
(In reply to David Jaša from comment #7)
> > → RFE: user username:pass in ovirt:// uris (such as ovirt://user:pass@rhev.example.org/)
> 
> So you want to use password from CLI as well? It's convenient for testing
> but otherwise it's more of a security risk

sure, but it's already possible to pass that, it's just not being used. So somehow there isn't much we can do about it. Or we can keep ignoring the pass, or error out if it's provided.

Comment 9 Marc-Andre Lureau 2014-07-21 10:58:54 UTC
assigning to Jonathon, moving to post? https://www.redhat.com/archives/virt-tools-list/2014-July/msg00073.html

Comment 10 CongDong 2014-09-17 08:57:56 UTC
Test with virt-viewer-0.6.0-4.el7.x86_64:

Steps:
1. prepare a guest on rhevm(rhevm.example.com), and add user "admin" to virtual machine permissions

2. on client:
# wget http://rhevm.example.com/ca.crt
# remote-viewer --ovirt-ca-file=ca.crt ovirt://rhevm.example.com/$vm

3. A login dialog comes out with blank for username and password, and input right username and password, will connect the guest.

4. Reconnect the guest with:
# remote-viewer --ovirt-ca-file=ca.crt ovirt://admin%40internal@rhevm.example.com/$vm

Result:
Step 4, dialog comes out with blank username and password.

VERIFY with virt-viewer-0.6.0-5.el7.x86_64.rpm

Steps are same with above.

Result:
dialog comes out, the username is filed with "admin@internal" and blank for password, and can connect the guest after input right password.

As the result, username is passed form cmdline to login dialog. Move to VERIFIED

Comment 11 Jiri Herrmann 2014-12-12 15:31:45 UTC
If this Feature should be included in the 7.1 Release Notes, could you please change the Doc Type from Enhancement to "Release Note"?

Note that the Release Notes are intended to list the most prominent and customer-relevant new features rather than every single enhancement.

Cheers,
Jirka

Comment 12 Christophe Fergeau 2014-12-12 16:02:55 UTC
No need to include this in the release notes.

Comment 14 errata-xmlrpc 2015-03-05 13:38:47 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-2015-0295.html


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