From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiPFl-0004n9-DP for qemu-devel@nongnu.org; Tue, 22 Mar 2016 12:34:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiPFi-0005IZ-7B for qemu-devel@nongnu.org; Tue, 22 Mar 2016 12:33:57 -0400 References: <1457635927-23045-1-git-send-email-berrange@redhat.com> <1457636396-24983-1-git-send-email-berrange@redhat.com> <1457636396-24983-4-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <56F173E6.6000604@redhat.com> Date: Tue, 22 Mar 2016 10:33:42 -0600 MIME-Version: 1.0 In-Reply-To: <1457636396-24983-4-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BXrDhgkLIu1SvnXSxe3Rhfc0rVAlH97xQ" Subject: Re: [Qemu-devel] [PATCH v3 04/10] util: add QAuthZ object as an authorization base class List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-block@nongnu.org, Markus Armbruster , =?UTF-8?Q?Andreas_F=c3=a4rber?= , Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BXrDhgkLIu1SvnXSxe3Rhfc0rVAlH97xQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/10/2016 11:59 AM, Daniel P. Berrange wrote: > The current qemu_acl module provides a simple access control > list facility inside QEMU, which is used via a set of monitor > commands acl_show, acl_policy, acl_add, acl_remove & acl_reset. >=20 > Note there is no ability to create ACLs - the network services > (eg VNC server) were expected to create ACLs that they want to > check. >=20 > There is also no way to define ACLs on the command line, nor > potentially integrate with external authorization systems like > polkit, pam, ldap lookup, etc. >=20 > The QAuthZ object defines a minimal abstract QOM class that can > be subclassed for creating different authorization providers. >=20 > Signed-off-by: Daniel P. Berrange > --- > +++ b/include/qemu/authz.h > + > +/** > + * QAuthZ: > + * > + * The QAuthZ class defines an API contract to be used > + * for providing an authorization driver for network > + * services. Just network services? Or is it broader than that? > +/** > + * qauthz_is_allowed: > + * @authz: the authorization object > + * @identity: the user identity to authorize > + * @errp: pointer to a NULL initialized error object > + * > + * Check if a user @identity is authorized > + * > + * Returns: true if @identity is authorizd, false otherwise s/authorizd/authorized/ I think you need more documentation on return semantics. Do we have strict binary return (either we returned true and errp is unset, or we returned false and errp is set), or is it a ternary (we return true and errp is unset: permission is explicitly granted; we return false and errp is unset: permission is explicitly denied; or we set errp: we could not determine permission). And if a ternary, do we also want to require that setting 'errp' also requires a return of false, or is the return undefined in that case? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BXrDhgkLIu1SvnXSxe3Rhfc0rVAlH97xQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW8XPmAAoJEKeha0olJ0NqowkIAJCiVtGFj3v39CzIclQf3Rxa lA21en1FSDyskrT4N2pEC3wOf8cooLRTzplhzYv1Eg6KvHo6c8ISmPK77a0kubIy NOK3X5m3jnxnw2DtxV2Zxh0wHP4AolwiMf0YxY0pX8EXXqc006xfQ0bgxJ/n/Ltz ZHsh3Mcg2tuLYIe/IXhUo7TixqPFDECUVkCJGY9/DSC/DC/5ovPHFIIPo3nw7zpb J9IBJTsbvy6ws08dXMva7sNDKjbZpWP0HQCJv5ssbqnD8y3NMqKbMUJGqyCHdGcq /MhvXpKOC+WDWmMpITpW1pOiCZUCg9wDYy2NJgXCnQVvB2570p0eimVU9D7WOI0= =qkLg -----END PGP SIGNATURE----- --BXrDhgkLIu1SvnXSxe3Rhfc0rVAlH97xQ--