From: Jeff Cody <jcody@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, kwolf@redhat.com, jdurgin@redhat.com,
mreitz@redhat.com, dillaman@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.9 4/5] rbd: Peel off redundant RbdAuthMethod wrapper struct
Date: Thu, 23 Mar 2017 23:55:37 -0400 [thread overview]
Message-ID: <20170324035537.GA22342@localhost.localdomain> (raw)
In-Reply-To: <59a3aed6-e1cf-a601-4369-1a7cd74500cc@redhat.com>
On Thu, Mar 23, 2017 at 04:56:30PM -0500, Eric Blake wrote:
> On 03/23/2017 04:43 PM, Eric Blake wrote:
>
> > We'd still have to allow libvirt's use of
> > ":key=...:auth_supported=cephx\\;none" on the command line, but from the
> > QMP side, we would support exactly one auth method, and libvirt will be
> > updated to match when it starts targetting blockdev-add instead of
> > legacy command line.
> >
> > If librados really needs 'cephx;none' any time cephx authorization is
> > requested, then even though the QMP only requests 'cephx', we can still
> > map it to 'cephx;none' in qemu - but I'm hoping that setting
> > auth_supported=cephx rather than auth_supported=cephx;none on the
> > librados side gives us what we (and libvirt) really want in the first place.
>
> Or, if it becomes something that libvirt wants to allow users to tune in
> their XML (right now, users don't get a choice, they get either 'none'
> or 'cephx;none'), a forward-compatible solution under my QMP proposal
> would be to have qemu add a third enum state, "none", "cephx", and
> "cephx-no-fallback".
>
> On the other hand, if supporting multiple methods at once makes sense
> (say librados adds a 'cephy' method, and that users could legitimately
> use both 'cephx;cephy' and 'cephy;cephx' with different behaviors), then
> keeping auth as an array of instances of a simple flat union scales
> nicer than having to add a combinatorial explosion of branches to the
> flat union to cover every useful combination of auth_supported methods.
> Maybe I'm overthinking it.
>
I spoke over email with Jason Dillaman (cc'ed), and this is what he told me
with regards to the authentication methods, and what cephx;none means:
On Thu, Mar 23, 2017 at 06:04:30PM -0400, Jason Dillaman wrote:
> It's saying that the client is willing to connect to a server that
> uses cephx auth or a server that uses no auth. Looking at the code,
> the "auth_supported" configuration key is actually deprecated and
> "auth_client_required" should be used instead (which defaults to
> 'cephx, none' already). Since it's been deprecated since v0.55 and if
> you are cleaning things up, feel free to switch to the new one if
> possible.
So from what Jason is saying, it seems like the conclusion we reached over
IRC is correct: it will attempt cephx but also fallback to no auth.
Also, since the preferred auth option may be named different depending on
ceph versions, I know think we probably should not tie the QAPI parameter to
the name of the older deprecated option.
I suggest that the 'auth_supported' parameter for QAPI be renamed to
'auth_method'. If you don't like the array and the flexibility it provides
at the cost of complexity, I think a flat enum consisting of 3 values like
you mentioned is reasonable. Since the QAPI does not need to map to the
legacy commandline used by libvirt, I would suggest maybe naming them
slightly different, though: any, none, strict
For 2.9, they could each map to 'auth_supported' like so:
any: "cephx;none"
none: "none"
strict: "cephx"
For 2.10, we could try to discover if 'auth_client_required' is supported or
not, and use either it or 'auth_supported' as appropriate (with the same
mappings as above).
The reason I like "any" and "strict", is it gives consistent meanings to
options even if new auth methods are introduced. For a hypothetical "cephy"
method example:
any: "cephy;cephx;none"
none: "none"
strict: "cephy;cephx"
-Jeff
next prev parent reply other threads:[~2017-03-24 3:55 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 10:55 [Qemu-devel] [PATCH for-2.9 0/5] rbd: Clean up API and code Markus Armbruster
2017-03-23 10:55 ` [Qemu-devel] [PATCH for-2.9 1/5] rbd: Clean up runtime_opts Markus Armbruster
2017-03-23 14:03 ` Eric Blake
2017-03-23 20:49 ` Kevin Wolf
2017-03-23 10:55 ` [Qemu-devel] [PATCH for-2.9 2/5] rbd: Clean up qemu_rbd_create()'s detour through QemuOpts Markus Armbruster
2017-03-23 14:47 ` Eric Blake
2017-03-23 20:50 ` Kevin Wolf
2017-03-23 10:55 ` [Qemu-devel] [PATCH for-2.9 3/5] rbd: Rewrite the code to extract list-valued options Markus Armbruster
2017-03-23 17:39 ` Eric Blake
2017-03-23 18:27 ` Markus Armbruster
2017-03-23 19:18 ` Eric Blake
2017-03-23 20:51 ` Eric Blake
2017-03-24 6:36 ` Markus Armbruster
2017-03-23 20:38 ` Kevin Wolf
2017-03-24 6:40 ` Markus Armbruster
2017-03-24 8:25 ` Markus Armbruster
2017-03-24 13:31 ` Eric Blake
2017-03-24 16:44 ` Kevin Wolf
2017-03-23 10:55 ` [Qemu-devel] [PATCH for-2.9 4/5] rbd: Peel off redundant RbdAuthMethod wrapper struct Markus Armbruster
2017-03-23 18:10 ` Eric Blake
2017-03-23 20:59 ` Eric Blake
2017-03-23 21:43 ` Eric Blake
2017-03-23 21:56 ` Eric Blake
2017-03-24 3:55 ` Jeff Cody [this message]
2017-03-24 7:05 ` Markus Armbruster
2017-03-24 12:42 ` Jeff Cody
2017-03-24 13:49 ` Eric Blake
2017-03-24 14:10 ` Jeff Cody
2017-03-24 14:31 ` Eric Blake
2017-03-27 5:58 ` Markus Armbruster
2017-03-27 16:41 ` Jeff Cody
2017-03-27 18:20 ` Markus Armbruster
2017-04-03 11:25 ` Daniel P. Berrange
2017-04-03 19:03 ` Eric Blake
2017-03-24 17:54 ` Kevin Wolf
2017-03-23 20:52 ` Kevin Wolf
2017-03-23 10:55 ` [Qemu-devel] [PATCH for-2.9 5/5] rbd: Reject options server.*.{numeric, to, ipv4, ipv6} Markus Armbruster
2017-03-23 18:12 ` Eric Blake
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=20170324035537.GA22342@localhost.localdomain \
--to=jcody@redhat.com \
--cc=armbru@redhat.com \
--cc=dillaman@redhat.com \
--cc=eblake@redhat.com \
--cc=jdurgin@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.