qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: ashish mittal <ashmit602@gmail.com>
Cc: Jeff Cody <jcody@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Ketan Nilangekar <Ketan.Nilangekar@veritas.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Fam Zheng <famz@redhat.com>,
	Ashish Mittal <Ashish.Mittal@veritas.com>,
	John Ferlan <jferlan@redhat.com>,
	Buddhi Madhav <Buddhi.Madhav@veritas.com>,
	Suraj Singh <Suraj.Singh@veritas.com>,
	Nitin Jerath <Nitin.Jerath@veritas.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Abhijit Dey <Abhijit.Dey@veritas.com>,
	"Venkatesha M.G." <Venkatesha.Mg@veritas.com>,
	Rakesh Ranjan <Rakesh.Ranjan@veritas.com>
Subject: Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"
Date: Mon, 20 Mar 2017 12:55:28 +0000	[thread overview]
Message-ID: <20170320125528.GM3792@redhat.com> (raw)
In-Reply-To: <CAAo6VWO7rpDPwP_iFGHNTo3zJqoZZXHAnfPbtkq+FZSSAWAjHw@mail.gmail.com>

On Fri, Mar 17, 2017 at 06:44:56PM -0700, ashish mittal wrote:
> On Thu, Mar 16, 2017 at 5:29 PM, ashish mittal <ashmit602@gmail.com> wrote:
> > On Mon, Mar 13, 2017 at 2:57 AM, Daniel P. Berrange <berrange@redhat.com> wrote:
> >> On Tue, Mar 07, 2017 at 05:27:55PM -0800, ashish mittal wrote:
> >>> Thanks! There is one more input I need some help with!
> >>>
> >>> VxHS network library opens a fixed number of connection channels to a
> >>> given host, and all the vdisks (that connect to the same host) share
> >>> these connection channels.
> >>>
> >>> Therefore, we need to open secure channels to a specific target host
> >>> only once for the first vdisk that connects to that host. All the
> >>> other vdisks that connect to the same target host will share the same
> >>> set of secure communication channels.
> >>>
> >>> I hope the above scheme is acceptable?
> >>>
> >>> If yes, then we have a couple of options to implement this:
> >>>
> >>> (1) Accept the TLS credentials per vdisk using the previously
> >>> discussed --object tls-creds-x509 mechanism. In this case, if more
> >>> than one vdisk have the same host info, then we will use only the
> >>> first one's creds to set up the secure connection, and ignore the
> >>> others. vdisks that connect to different target hosts will use their
> >>> individual tls-creds-x509 to set up the secure channels. This is, of
> >>> course, not relevant for qemu-img/qemu-io as they can open only one
> >>> vdisk at a time.
> >>
> >> It looks like option 1 here is the way to go. Just report an error if
> >> there are multiple creds provided for the same host and they don't
> >> match.
> >>
> >
> > I have made changes to implement option 1 in the library (branch
> > per_channel_ssl).
> > Can you please help review it?
> > https://github.com/VeritasHyperScale/libqnio/compare/per_channel_ssl
> >
> > Here's the changelog:
> > (1) Changed code to not use instance UUID for setting up SSL context.
> > (2) User is supposed to pass the cacert, client_key and client_cert
> >     files to iio_open(). These will be used to set up a per-channel secure SSL
> >     connection to the server. All three values are needed to set up a
> >     secure connection.
> > (3) If the secure channel to a particular host is already open, other
> >     block device connections to the same host will have to provide
> >     TLS/SSL credentials that match the original one.
> > (4) Set default locations for trusted client CA certificates
> >      based on user specified cacert file.
> >
> > NB - I have given steps to test SSL communication (using the supplied
> > test client/server programs) in the commit log. I have not tested
> > using qemu binary yet. Will run more tests in the days to come.
> >
> > qemu vxhs patch changes should be pretty straightforward, given that
> > we have already discussed how to implement passing --object
> > tls-creds-x509 per block device.
> >
> > Thanks!
> >
> 
> Update -
> (1) Successfully tested SSL communication using qemu-io and the test server.
> (2) Minor changes to per_channel_ssl branch.
> (3) Created a pull request.
> 
> Please review per convenience. Thanks!

IIUC, on that branch the 'is_secure()' method is still looking for the
directory /var/lib/libvxhs/secure to exist on the host. If that is not
present, then it appears to be silently ignoring the SSL certs passed
in from QEMU.

IMHO it should enable TLS when 'cacert' passed to iio_open is not NULL,
not relying on a magic directory to exist.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

  reply	other threads:[~2017-03-20 12:55 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 22:24 [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs" ashish mittal
2017-02-17 21:42 ` Jeff Cody
2017-02-18  0:30   ` Ketan Nilangekar
2017-02-20  9:50     ` Daniel P. Berrange
2017-02-20 11:02     ` Stefan Hajnoczi
2017-02-20 11:34       ` ashish mittal
2017-02-21 10:59         ` Stefan Hajnoczi
2017-02-21 11:33           ` Daniel P. Berrange
2017-02-22 14:09             ` Stefan Hajnoczi
2017-02-22 14:22               ` Daniel P. Berrange
2017-02-22 14:44                 ` Jeff Cody
2017-02-24  4:19                   ` ashish mittal
2017-02-24  9:19                     ` Daniel P. Berrange
2017-02-24 23:30                       ` ashish mittal
2017-02-27  9:22                         ` Daniel P. Berrange
2017-02-28 22:51                           ` ashish mittal
2017-03-01  9:18                             ` Daniel P. Berrange
2017-03-06  0:26                               ` ashish mittal
2017-03-06  9:23                                 ` Daniel P. Berrange
2017-03-08  1:27                                   ` ashish mittal
2017-03-08  9:13                                     ` Daniel P. Berrange
2017-03-08 13:04                                       ` Ketan Nilangekar
2017-03-08 17:59                                         ` ashish mittal
2017-03-08 18:11                                           ` Daniel P. Berrange
2017-03-11  3:04                                             ` ashish mittal
2017-03-13  9:56                                               ` Daniel P. Berrange
2017-03-13  9:57                                     ` Daniel P. Berrange
2017-03-17  0:29                                       ` ashish mittal
2017-03-18  1:44                                         ` ashish mittal
2017-03-20 12:55                                           ` Daniel P. Berrange [this message]
2017-03-23  0:03                                             ` ashish mittal
2017-03-27  3:07                                               ` ashish mittal
2017-02-21 17:21           ` Ketan Nilangekar
2017-02-21 17:39             ` Daniel P. Berrange
2017-02-21 18:06               ` Jeff Cody
2017-02-21 18:56                 ` Daniel P. Berrange
2017-02-21 19:25                   ` Jeff Cody
2017-02-22 10:12                     ` Daniel P. Berrange
2017-02-22 14:25             ` Stefan Hajnoczi
2017-02-20  9:44   ` Daniel P. Berrange
  -- strict thread matches above, loose matches on Subject: below --
2017-02-09  5:23 Ashish Mittal
2017-02-09  6:29 ` Jeff Cody
2017-02-09  9:24   ` ashish mittal
2017-02-09 14:32     ` Jeff Cody
2017-02-09 16:14       ` ashish mittal
2017-02-09 16:50         ` Jeff Cody
2017-02-09 18:08           ` ashish mittal
2017-02-09 18:45             ` ashish mittal
2017-02-10  0:27               ` ashish mittal
2017-02-10  2:18                 ` Jeff Cody
2017-02-14 20:51     ` Jeff Cody
2017-02-14 22:34       ` ashish mittal
2017-02-15  3:02         ` ashish mittal
2017-02-15  3:54           ` Jeff Cody
2017-02-15 20:34             ` ashish mittal

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=20170320125528.GM3792@redhat.com \
    --to=berrange@redhat.com \
    --cc=Abhijit.Dey@veritas.com \
    --cc=Ashish.Mittal@veritas.com \
    --cc=Buddhi.Madhav@veritas.com \
    --cc=Ketan.Nilangekar@veritas.com \
    --cc=Nitin.Jerath@veritas.com \
    --cc=Rakesh.Ranjan@veritas.com \
    --cc=Suraj.Singh@veritas.com \
    --cc=Venkatesha.Mg@veritas.com \
    --cc=armbru@redhat.com \
    --cc=ashmit602@gmail.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jferlan@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).