]> xenbits.xensource.com Git - people/dariof/libvirt.git/commit
Add info about access control checks into API reference
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 7 Aug 2013 12:03:50 +0000 (13:03 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 8 Aug 2013 10:59:46 +0000 (11:59 +0100)
commit664ab2801dfcb8e72fc4408cc50c279bf74e47a2
treeb61b8e89f5624508d99bc098491d91bd0e65a36e
parent31d41d9268a6731e303700b5a5825a87a6f36a19
Add info about access control checks into API reference

So that app developers / admins know what access control checks
are performed for each API, this patch extends the API docs
generator to include details of the ACLs for each.

The gendispatch.pl script is extended so that it generates
a simple XML describing ACL rules, eg.

  <aclinfo>
    ...
    <api name='virConnectNumOfDomains'>
      <check object='connect' perm='search_domains'/>
      <filter object='domain' perm='getattr'/>
    </api>
    <api name='virDomainAttachDeviceFlags'>
      <check object='domain' perm='write'/>
      <check object='domain' perm='save' flags='!VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_AFFECT_LIVE'/>
      <check object='domain' perm='save' flags='VIR_DOMAIN_AFFECT_CONFIG'/>
    </api>
    ...
  </aclinfo>

The newapi.xsl template loads the XML files containing the ACL
rules and generates a short block of HTML for each API describing
the parameter checks and return value filters (if any).

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
.gitignore
docs/libvirt.css
docs/newapi.xsl
src/Makefile.am
src/rpc/gendispatch.pl