qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-block@nongnu.org, mreitz@redhat.com, jdurgin@redhat.com,
	jcody@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC][BROKEN] rbd: Allow configuration of authentication scheme
Date: Wed, 18 Apr 2018 16:26:33 +0200	[thread overview]
Message-ID: <20180418142633.GG4971@localhost.localdomain> (raw)
In-Reply-To: <2769edf8-0bf6-5163-d86d-f721c1af86bd@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2286 bytes --]

Am 18.04.2018 um 16:16 hat Eric Blake geschrieben:
> On 04/18/2018 08:50 AM, Kevin Wolf wrote:
> 
> >>> @@ -3195,6 +3215,8 @@
> >>>              '*conf': 'str',
> >>>              '*snapshot': 'str',
> >>>              '*user': 'str',
> >>> +            '*auth-none': 'bool',
> >>> +            '*auth-cephx': 'RbdAuthCephx',
> >>>              '*server': ['InetSocketAddressBase'] } }
> >>
> >> Would it be better to have this be a flat union with 'auth' with enum
> >> values 'none', 'cephx', 'both' as a discriminator that determines which
> >> additional fields can be present?  Or does that require that we first
> >> fix the QAPI generator to allow nesting a flat union within another flat
> >> union (probably doable, just no one has needed it before now)?  Is it
> >> also time to improve the QAPI generator to allow a default value to the
> >> discriminator field, rather than requiring the field to be present?
> > 
> > Both options can be enabled at the same time, so that the client
> > connects to a server no matter whether it does 'cephx' authentication or
> > only 'none. This is even the default for rbd driver (in the existing
> > command line interface, but I think we need to stay compatible with it).
> > With a union you would have to explicitly choose one or the other, but
> > could never accept both.
> > 
> > The other option we were considering was a list of authentication
> > options, which would be easier to implement, but isn't really an
> > accurate representation of what we really accept. There is no way we
> > could meaningfully implement something like this:
> > 
> >     'auth': [ { 'type': 'cephx', 'key-secret': 'foo' },
> >               { 'type': 'cephx', 'key-secret': 'bar' } ]
> > 
> > Because Ceph only allows us to enable the 'cephx' authentication method
> > and to set a single key for it.
> 
> How does it look as a choice between:
> 
> {'enum':'CephxAuth', 'data': ['none', 'cephx', 'both' ]}
> 
> where both 'cephx' and 'both' support the optional 'key-secret'
> parameter, but 'none' does not?

Doesn't really look extensible for the case that Ceph adds a third mode.
At least I don't think we want to have an enum and associated union
branches for all possible combinations?

Kevin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2018-04-18 14:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05 17:06 [Qemu-devel] [RFC][BROKEN] rbd: Allow configuration of authentication scheme Kevin Wolf
2018-04-06  8:04 ` Kevin Wolf
2018-04-18  9:41   ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2018-04-18 13:21   ` [Qemu-devel] " Eric Blake
2018-04-18 13:40     ` Kevin Wolf
2018-04-18 13:26 ` Eric Blake
2018-04-18 13:50   ` Kevin Wolf
2018-04-18 14:16     ` Eric Blake
2018-04-18 14:26       ` Kevin Wolf [this message]
2018-04-18 15:06 ` Markus Armbruster
2018-04-18 16:28   ` Kevin Wolf
2018-04-18 16:34     ` Daniel P. Berrangé
2018-04-18 16:52       ` Kevin Wolf
2018-04-18 17:04         ` Daniel P. Berrangé
2018-04-20 13:34           ` Markus Armbruster
2018-04-20 13:55             ` Daniel P. Berrangé
2018-04-20 14:50               ` Markus Armbruster
2018-04-20 14:53                 ` Daniel P. Berrangé
2018-04-20 16:15                   ` Markus Armbruster
2018-04-20 14:39     ` Markus Armbruster
2018-04-24 18:26       ` Jeff Cody
2018-04-25  7:50         ` Kevin Wolf
2018-04-27  4:27           ` Jeff Cody

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=20180418142633.GG4971@localhost.localdomain \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jdurgin@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).