<div dir="ltr"><div>I read this page <a href="https://libvirt.org/aclpolkit.html">https://libvirt.org/aclpolkit.html</a><br></div>And it is written :"At this point in time, the only attribute provided by
      libvirt to identify the user invoking the operation
      is the PID of the client program. This means that the
      polkit access control driver is only useful if connections
      to libvirt are restricted to its UNIX domain socket."<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-09 11:00 GMT+03:00 Daniel P. Berrangé <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, May 09, 2018 at 09:46:28AM +0300, Anastasiya Ruzhanskaya wrote:<br>
> Hello!<br>
> According to the documentation access control drivers are not in really<br>
> "good condition". There is a polkit, but it can distinguish users only<br>
> according the pid. However, I have met some articles about more<br>
> fine-grained control and about selinux drivers for libvirt? So, what is the<br>
> status now? Should I implement something by myself if I want access based<br>
> on login, are their instructions how to write these drivers or there is<br>
> smth already?<br>
<br>
</div></div>The polkit access control driver is the only one we support, and it is not<br>
something that end users can replace as this is not a public plugin system.<br>
Any alternate impl would have to be part of libvirt core.<br>
<br>
I'm not sure what docs you are referring to, but the polkit driver is in<br>
perfectly good condition. It is not restricted to just checking PIDs,<br>
in fact PID is largely irrelevant - user name and group membership are<br>
the important things to check. Ther is an example in the source tree at<br>
examples/polkit/libvirt-acl.<wbr>rules showing a simple RBAC approach to using<br>
polkit.<br>
<br>
Regards,<br>
Daniel<br>
<span class="HOEnZb"><font color="#888888">-- <br>
|: <a href="https://berrange.com" rel="noreferrer" target="_blank">https://berrange.com</a>      -o-    <a href="https://www.flickr.com/photos/dberrange" rel="noreferrer" target="_blank">https://www.flickr.com/photos/<wbr>dberrange</a> :|<br>
|: <a href="https://libvirt.org" rel="noreferrer" target="_blank">https://libvirt.org</a>         -o-            <a href="https://fstop138.berrange.com" rel="noreferrer" target="_blank">https://fstop138.berrange.com</a> :|<br>
|: <a href="https://entangle-photo.org" rel="noreferrer" target="_blank">https://entangle-photo.org</a>    -o-    <a href="https://www.instagram.com/dberrange" rel="noreferrer" target="_blank">https://www.instagram.com/<wbr>dberrange</a> :|<br>
</font></span></blockquote></div><br></div>