From: Anil Madhavapeddy <anil@recoil.org>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
Ewan Mellor <ewan@xensource.com>
Subject: Re: [RFC][PATCH] Secure XML-RPC for Xend
Date: Fri, 9 Jun 2006 09:34:35 +0100 [thread overview]
Message-ID: <20060609083434.GA19035@fork.recoil.org> (raw)
In-Reply-To: <4488D93D.7070303@us.ibm.com>
On Thu, Jun 08, 2006 at 09:13:17PM -0500, Anthony Liguori wrote:
> Add support secure XML-RPC. This is done by multiplexing multiple SSH
> sessions over a single session (to avoid multiple password entries). Here are
> the changes:
I like the general idea, comments inline.
>
> 1) Add support to xmlrpclib2.ServerProxy for ssh:// protocol
> 2) Add an xm serve command which proxies XML-RPC over stdio
> 3) Make xm look at the XM_SERVER variable to determine which XML-RPC protocol
> to use
>
> There are some issues that need to be addressed before inclusion. Namely:
>
> 1) Python moans about tempnam(). I don't think there's a better solution
> though.
I don't like the dependency on directly calling ssh multiplexing,
as it requires a relatively modern OpenSSH (>3.9) and the above
race condition is introduced. A newer feature in OpenSSH is to let
the ControlPath consist of "%h,%p,%r" wildcards which fill in the
host/user/port being connected to in a socket pathname, which solves
that particular race.
Why not just do the SSH every time, and let the user either set up
connection multiplexing or ssh agent in their local environment
instead? That way it will work for old OpenSSH versions and you
don't have to deal with all the quirks.
> 2) A command *must* be executed to cleanup the ssh session on exit. I
> currently use __del__() which doesn't seem to make Python happy in certain
> cases.
> 3) I have done basic testing but not regression testing with xm-test
>
> diff -r 4f1e39ec05d6 -r 4de241a7e91a tools/python/xen/util/xmlrpclib2.py
...
> + def runcmd(self, cmd, data=None):
> + """Runs a command using an existing SSH connection.
> +
> + This function will run the passed in command on a remote
> + machine and either return the output or raise an OSError
> + if the command exits with a non-zero status (or some
> + other failure occurs)."""
> +
> + cmdline = self.getcmd(cmd)
> + if data:
> + f = open("/tmp/stuff.txt", "w")
> + f.write(data)
> + f.close()
> + cmdline = "cat /tmp/stuff.txt | %s" % cmdline
Ouch, this bit definitely needs to be fixed at least :)
--
Anil Madhavapeddy http://anil.recoil.org
University of Cambridge http://www.cl.cam.ac.uk
next prev parent reply other threads:[~2006-06-09 8:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 2:13 [RFC][PATCH] Secure XML-RPC for Xend Anthony Liguori
2006-06-09 2:45 ` Matthew Palmer
2006-06-09 8:34 ` Anil Madhavapeddy [this message]
2006-06-09 8:41 ` Daniel Veillard
2006-06-09 8:54 ` Anil Madhavapeddy
2006-06-09 14:57 ` Anthony Liguori
2006-06-09 15:45 ` Daniel Veillard
2006-06-09 15:57 ` Anthony Liguori
2006-06-09 12:00 ` Anthony Liguori
2006-06-14 8:36 ` Ewan Mellor
2006-06-14 17:26 ` Anthony Liguori
2006-06-14 17:36 ` Ewan Mellor
-- strict thread matches above, loose matches on Subject: below --
2006-06-09 8:10 Ian Pratt
2006-06-09 12:10 ` Anthony Liguori
2006-06-14 8:43 ` Ewan Mellor
2006-06-14 17:34 ` Anthony Liguori
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=20060609083434.GA19035@fork.recoil.org \
--to=anil@recoil.org \
--cc=aliguori@us.ibm.com \
--cc=ewan@xensource.com \
--cc=xen-devel@lists.xensource.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 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.