[libvirt] [PATCH] test driver: Add authentication to test driver.

Daniel P. Berrange berrange at redhat.com
Fri Jan 10 14:15:00 UTC 2014


On Wed, Jan 08, 2014 at 06:39:40PM +0000, Richard W.M. Jones wrote:
> There is no easy way to test authentication against libvirt.  This
> commit modifies the test driver to allow simple username/password
> authentication.
> 
> You modify the test XML by adding:
> 
>  <node>
>    ...
>    <auth>
>      <user password="123456">rich</user>
>      <user>jane</user>
>    </auth>
>  </node>
> 
> If there are any /node/auth/user elements, then authentication is
> required by the test driver (if none are present, then the test driver
> will work as before and not require authentication).

The API is explicitly designed to avoid hardcoding a fixed notion
of usernames + passwords, so I think the test driver should do the
same. ie we'd want XML in terms of credential types.

  <auth>
    <subject>
      <credential type='username'>rich</credential>
      <credential type='password'>123456</credential>
    </subject>
    ...more subjects...
  </auth>

Regards.
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list