qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Ayal Baron <abaron@redhat.com>
Cc: Barak Azulay <bazulay@redhat.com>,
	Gal Hammer <ghammer@redhat.com>,
	vdsm-devel@lists.fedorahosted.org, qemu-devel@nongnu.org,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	arch@ovirt.org
Subject: Re: [Qemu-devel] converging  around a single guest agent
Date: Thu, 17 Nov 2011 08:42:59 -0600	[thread overview]
Message-ID: <4EC51D73.9050901@codemonkey.ws> (raw)
In-Reply-To: <030b182c-2851-40e5-b0e8-682725258fac@zmail07.collab.prod.int.phx2.redhat.com>

On 11/17/2011 02:59 AM, Ayal Baron wrote:
>
>
> ----- Original Message -----
>> On 11/16/2011 11:53 AM, Barak Azulay wrote:
>>> On Wednesday 16 November 2011 17:28:16 Michael Roth wrote:
>>>> 2) You'd also need a schema, similar to
>>>> qemu.git/qapi-schema-guest.json,
>>>> to describe the calls you're proxying. The existing infrastructure
>>>> in
>>>> QEMU will handle all the work of marshalling/unmarshalling
>>>> responses
>>>> back to the QMP client on the host-side.
>>>>
>>>> It's a bit of extra work, but the benefit is unifying the
>>>> qemu/guest-level management interface into a single place that's
>>>> easy
>>>> for QMP/libvirt to consume.
>>>>
>>>
>>> The issue is not whether it's possible or not or the amount of
>>> efforts need to
>>> be done for that to happen, either for qemu-ga or ovirt-guest-agent
>>> this work
>>> needs to be done.
>>>
>>> the question is whether all comminication should go through the
>>> monitor (hence
>>> double proxy) or ... only a subset of the commands that are closly
>>> related to
>>> hypervisor functionality and separate it from general
>>> management-system
>>> related actions (e.g. ovirt or any other management system that
>>> wants to
>>> communicate to the guest).
>>
>> Yes, all guest interaction should be funnelled through QEMU.  QEMU
>> has one job
>> in life--to expose an interface to guests and turn it into something
>> more useful
>> to the host.  QEMU expose an emulated AHCI controller and turns that
>> into VFS
>> operations.
>>
>> Likewise, QEMU should expose a paravirtual "agent" device to a guest,
>> and then
>> turn that into higher level management interfaces.
>
> Exposing higher level management interfaces means that qemu would have to do policy.

No, the way we plan on doing this is having a guest agent schema 
(qapi-schema-guest.json) that we can use to (1) white list valid operations and 
(2) decode and re-encode operations.

(1) let's us validate that guest state isn't escaping which keeps migration safe

(2) let's us scrub any potentially malicious input from the guest before we hand 
it off to the management tool.

Otherwise, we don't get in the middle and don't really care what the verbs are.

>>
>> QEMU's job is to sanitize information from the guest and try to turn
>> that into
>> something that is safer for the broader world to consume.  QEMU also
>> deals with
>> isolating state in order to support things like live migration.  This
>
> So are you suggesting that when a user reads a file you would automatically encode the contents?

I'm not sure I understand what you're suggesting.

Here's another way to think of this.  In a typical enterprise environment, you 
would secure your network infrastructure using isolated zones.  You may have a 
red zone (guest networking), a yellow zone (management network), and a green 
zone (broader intranet).  The zones are physically separate with very few things 
that exist on two zones.

You pay special attention to anything that crosses zones and try to minimize 
them as much as possible.  You never allow something to live on more than two zones.

The guest is the red zone and the rest of the host environment is the yellow 
zone.  QEMU bridges between the red and yellow zone.  That is fundamentally its 
job in the stack.

Other than the guest agent, VDSM lives purely in the yellow zone.  In fact, VDSM 
bridges from the yellow zone to the green zone (broader management infrastructure).

It may be easier to skip QEMU and have VDSM also stride into the red zone.  It's 
always easier to cross zones.  But it's not good security practice.  There is 
tremendous value in having clean security layers.

Regards,

Anthony Liguori

  reply	other threads:[~2011-11-17 14:43 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 17:24 [Qemu-devel] converging around a single guest agent Barak Azulay
2011-11-15 17:33 ` Alon Levy
2011-11-16 13:08   ` Gal Hammer
2011-11-15 18:01 ` Perry Myers
2011-11-15 18:08   ` Subhendu Ghosh
2011-11-15 19:45     ` Perry Myers
2011-11-16  6:48       ` Barak Azulay
2011-11-15 19:08 ` Anthony Liguori
2011-11-15 22:39   ` Ayal Baron
2011-11-16  7:53     ` Hans de Goede
2011-11-16  8:16       ` Ayal Baron
2011-11-16 14:59         ` Michael Roth
2011-11-17 15:11           ` Alon Levy
2011-11-16 12:07       ` Alon Levy
2011-11-16 13:45         ` Dor Laor
2011-11-16 13:47         ` Anthony Liguori
2011-11-16 17:55           ` Hans de Goede
2011-11-17 10:16             ` Alon Levy
2011-11-16 13:36     ` Anthony Liguori
2011-11-16 13:39       ` Dor Laor
2011-11-16 13:42         ` Anthony Liguori
2011-11-16 14:10           ` Ayal Baron
2011-11-16 14:20           ` Paolo Bonzini
2011-11-17  7:17             ` Itamar Heim
2011-11-17 14:31             ` Jamie Lokier
2011-11-16 13:45     ` Anthony Liguori
2011-11-15 19:09 ` Anthony Liguori
2011-11-15 23:01 ` Michael Roth
2011-11-16  0:42   ` Alexander Graf
2011-11-16  7:05     ` Barak Azulay
2011-11-16  8:16       ` Alexander Graf
2011-11-16 12:13         ` Barak Azulay
2011-11-16 15:28           ` Michael Roth
2011-11-16 17:53             ` Barak Azulay
2011-11-16 21:44               ` Michael Roth
2011-11-17  0:03               ` Anthony Liguori
2011-11-17  8:59                 ` Ayal Baron
2011-11-17 14:42                   ` Anthony Liguori [this message]
2011-11-16 10:18   ` Daniel P. Berrange
2011-11-16 20:24 ` Adam Litke
2011-11-17  2:09   ` Michael Roth
2011-11-17  8:46   ` Ayal Baron
2011-11-17 14:58     ` Michael Roth
2011-11-17 15:58     ` Adam Litke
2011-11-17 16:14       ` Daniel P. Berrange
2011-11-17 16:53         ` Eric Gaulin
2011-11-25 19:33         ` Barak Azulay
2011-11-17 17:09   ` Barak Azulay
2011-11-18  0:47     ` Luiz Capitulino
2011-11-17  0:48 ` [Qemu-devel] wiki summary Michael Roth
2011-11-17 16:34   ` Barak Azulay
2011-11-17 19:58     ` Michael Roth
2011-11-18 11:25       ` Barak Azulay
2011-11-18 14:10         ` Adam Litke
2011-11-18 14:21         ` Michael Roth
2011-11-24 12:40       ` Dor Laor
2011-11-24 16:47         ` Richard W.M. Jones
2011-11-25 10:07         ` Daniel P. Berrange
2011-11-27 12:19           ` Dor Laor

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=4EC51D73.9050901@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=abaron@redhat.com \
    --cc=arch@ovirt.org \
    --cc=bazulay@redhat.com \
    --cc=ghammer@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vdsm-devel@lists.fedorahosted.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).