From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Max Reitz" <mreitz@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
qemu-block@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Juan Quintela" <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/6] nbd: allow authorization with nbd-server-start QMP command
Date: Wed, 20 Jun 2018 15:07:54 +0100 [thread overview]
Message-ID: <20180620140754.GP3441@redhat.com> (raw)
In-Reply-To: <205e17cb-30f6-ace2-d8eb-e6a60d84731d@redhat.com>
On Wed, Jun 20, 2018 at 09:05:32AM -0500, Eric Blake wrote:
> On 06/20/2018 07:14 AM, Daniel P. Berrangé wrote:
> > From: "Daniel P. Berrange" <berrange@redhat.com>
>
> I thought you preferred the UTF-8 accent in your Author lines these days?
> Or is this because this patch has been sitting around in your local repo
> prior to the point where you switched your git config author spelling? (Also
> applies to S-o-b in the series)
Yeah its "only" been sitting in my tree since late 2016 :-)
>
> >
> > As with the previous patch to qemu-nbd, the nbd-server-start QMP command
> > also needs to be able to specify authorization when enabling TLS encryption.
> >
> > First the client must create a QAuthZ object instance using the
> > 'object-add' command:
> >
>
> > They can then reference this in the new 'tls-authz' parameter when
> > executing the 'nbd-server-start' command:
> >
>
> > @@ -132,11 +137,12 @@ void nbd_server_start(SocketAddress *addr, const char *tls_creds,
> > void qmp_nbd_server_start(SocketAddressLegacy *addr,
> > bool has_tls_creds, const char *tls_creds,
> > + bool has_tls_authz, const char *tls_authz,
> > Error **errp)
> > {
> > SocketAddress *addr_flat = socket_address_flatten(addr);
> > - nbd_server_start(addr_flat, tls_creds, errp);
> > + nbd_server_start(addr_flat, tls_creds, tls_authz, errp);
>
> Relies on QMP generated code setting tls_authz = NULL if has_tls_authz is
> false (but no different than the fact that we already relied on it for
> tls_creds). Someday it would be nice to get rid of the has_FOO for optional
> strings, but that's not your problem.
>
> > +++ b/qapi/block.json
> > @@ -197,6 +197,11 @@
> > #
> > # @addr: Address on which to listen.
> > # @tls-creds: (optional) ID of the TLS credentials object. Since 2.6
> > +# @tls-authz: ID of the QAuthZ authorization object used to validate
> > +# the client's x509 distinguished name. This object is
> > +# is only resolved at time of use, so can be deleted and
> > +# recreated on the fly while the NBD server is active.
> > +# If missing, it will default to denying access. Since 3.0
> > #
> > # Returns: error if the server is already running.
> > #
> > @@ -204,7 +209,8 @@
> > ##
> > { 'command': 'nbd-server-start',
> > 'data': { 'addr': 'SocketAddressLegacy',
> > - '*tls-creds': 'str'} }
> > + '*tls-creds': 'str',
> > + '*tls-authz': 'str'} }
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> Although patch 1 and 2 touch NBD, I'm happy for Dan to be the one that
> merges it as part of the larger series.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-06-20 14:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 12:14 [Qemu-devel] [PATCH v2 0/6] Add authorization support to all network services Daniel P. Berrangé
2018-06-20 12:14 ` [Qemu-devel] [PATCH v2 1/6] qemu-nbd: add support for authorization of TLS clients Daniel P. Berrangé
2018-06-20 13:58 ` Eric Blake
2018-06-20 14:03 ` Daniel P. Berrangé
2018-06-20 14:22 ` Dr. David Alan Gilbert
2018-06-20 14:26 ` Daniel P. Berrangé
2018-06-20 14:45 ` Dr. David Alan Gilbert
2018-06-20 14:28 ` Eric Blake
2018-06-20 12:14 ` [Qemu-devel] [PATCH v2 2/6] nbd: allow authorization with nbd-server-start QMP command Daniel P. Berrangé
2018-06-20 14:05 ` Eric Blake
2018-06-20 14:07 ` Daniel P. Berrangé [this message]
2018-06-20 12:14 ` [Qemu-devel] [PATCH v2 3/6] migration: add support for a "tls-authz" migration parameter Daniel P. Berrangé
2018-06-20 12:14 ` [Qemu-devel] [PATCH v2 4/6] chardev: add support for authorization for TLS clients Daniel P. Berrangé
2018-06-20 12:14 ` [Qemu-devel] [PATCH v2 5/6] vnc: allow specifying a custom authorization object name Daniel P. Berrangé
2018-06-20 12:14 ` [Qemu-devel] [PATCH v2 6/6] monitor: deprecate acl_show, acl_reset, acl_policy, acl_add, acl_remove Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180620140754.GP3441@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).