[Spice-devel] [spice-gtk 0/5] Add support for looking up connection credentials in a file

Christophe Fergeau cfergeau at redhat.com
Tue Jun 4 07:19:09 PDT 2013


This patch series adds support for something similar to what is described
in http://libvirt.org/auth.html: when a password is needed but it hasn't
been provided, we search for a file containing the auth info. It can be
specified through an environment variable, in the SPICE URI, then it's
looked up in XDG_CONFIG_DIR, and finally in /etc/libvirt/auth.conf.  There
are a few things that may deserve polishing in this scheme:
- it's quite libvirt centered with respects to the naming of the env var,
  of the default dir locations, ...
- the port number needs to be added to the auth-$SERVICE-$HOSTNAME scheme
  described on http://libvirt.org/auth.html as multiple VMs can run on the
  same host
- it does not go very well with libvirt automatic spice port allocation as
  the credential file has to hardcode the port numbers, but the port number
  is not fixed when using automatic allocation

I still think this can be useful to people who are looking for a way to
pass spice password to the client without passing it on the command line as
was suggested in https://bugzilla.redhat.com/show_bug.cgi?id=794644#c6

There is also one thing I'd like to fix before committing but I was not
sure if there is a nice way to achieve that: at the moment, the only reason
SpiceAuthFile is public is because of the unit test that goes with patch 4/5,
I don't know if it's possible to achieve the same without exporting the symbols..


More information about the Spice-devel mailing list