This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 844327 - ocaml-libvirt needs to bind virConnectOpenAuth
ocaml-libvirt needs to bind virConnectOpenAuth
Status: NEW
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ocaml-libvirt (Show other bugs)
6.5
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On:
Blocks: 844237 844326
  Show dependency treegraph
 
Reported: 2012-07-30 06:08 EDT by Richard W.M. Jones
Modified: 2016-07-01 05:36 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 844326
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2012-07-30 06:08:04 EDT
+++ This bug was initially created as a clone of Bug #844326 +++

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

Created attachment 601105 [details]
libvirtd's log with log_level=1

Description of problem:
  virt-top fail to connect through tcp connection with sasl authentication

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6_3.3.x86_64
virt-top-1.0.4-3.13.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Edit /etc/sysconfig/libvirtd uncomment LIBVIRTD_ARGS
LIBVIRTD_ARGS="--listen"

2.Edit  /etc/libvirt/libvirtd.conf
listen_tcp =1
auth_tcp = "sasl"

3.Add a user named "fred", and setting his password as "redhat"
# saslpasswd2 -a libvirt fred
Password: xxxxxx
Again (for verification): xxxxxx

4. #service libvirtd restart

5. #service iptables stop

6. virsh -c qemu+tcp://$ip/system

7. virt-top -c qemu+tcp://$ip/system --debug /tmp/virt-top-debug

Actual results:
1. Step 6 works well
2. Step 7 fails with following error:
--------------------------------------------------------------------------------------
libvir: RPC error : authentication failed: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism available: No worthy mechs found)
libvirt: VIR_ERR_AUTH_FAILED: VIR_FROM_RPC: authentication failed: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism available: No worthy mechs found)
--------------------------------------------------------------------------------------

Expected results:
1. virt-top could work well.

Additional info:
1. After step 7, debug file wasn't created, so I cannot provide it. Only attach the libvirtd's log

--- Additional comment from rjones@redhat.com on 2012-07-30 03:29:38 EDT ---

To Dan:

Does SASL authentication need a connection call other than
virConnectOpen{,ReadOnly}?

If so then we'll need to duplicate this bug for ocaml-libvirt
and add that package to the Approved Components List.

--- Additional comment from berrange@redhat.com on 2012-07-30 03:56:16 EDT ---

Yes, you need to use virConnectOpenAuth() and provide an authentication callback to collect credentials. In the case of virt-top, since it is a CLI app, you can just pass "virConnectAuthDefault" to OpenAuth. For the OCaml API in general, you'd need to allow user specified callbacks.
Comment 2 RHEL Product and Program Management 2013-10-13 20:32:29 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

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