From: Anthony Liguori <aliguori@us.ibm.com>
To: Ewan Mellor <ewan@xensource.com>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
xen-devel@lists.xensource.com,
Daniel Veillard <veillard@redhat.com>
Subject: Re: [RFC] Xend XML-RPC Refactoring
Date: Sat, 11 Mar 2006 19:46:35 -0600 [thread overview]
Message-ID: <44137D7B.7050403@us.ibm.com> (raw)
In-Reply-To: <20060311222053.GA5963@leeni.uk.xensource.com>
Ewan Mellor wrote:
> On Sat, Mar 11, 2006 at 04:36:57PM -0500, Daniel Veillard wrote:
>
> Turning the server on and off is just for basic sanity -- the admin gets
> to choose which ports they want open so that they don't have to audit
> aspects in which they aren't interested.
>
> Of course, a full user / permissions system for the protocol would be a
> good idea, but like you say, it's not trivial work. We could kick that
> discussion off if you want, but it's going to need someone to design
> the permissions semantics, management of users and roles, etc. Is
> anyone interested in starting this?
>
We can do basic authentication and require root credentials as a start.
That's really easy to do but I'm not sure sending the root password as
clear text really makes things much better :-)
Python, unfortunately, doesn't have server-side SSL bindings so basic
authentication over SSL is not an option without some custom OpenSSL
bindings.
Regards,
Anthony Liguori
> At the moment, the XML-RPC is over a Unix domain socket, so only root
> can use it anyway (as controlled by the permission on the socket file).
>
>
>>>> diff -r c369d960f96b -r 095ac0d95d9c tools/python/xen/util/xmlrpclib2.py
>>>> --- /dev/null Tue Feb 28 16:45:20 2006
>>>> +++ b/tools/python/xen/util/xmlrpclib2.py Tue Feb 28 22:08:47 2006
>>>>
>>>> [Snip lots]
>>>>
>>>> +class ServerProxy(xmlrpclib.ServerProxy):
>>>> + def __init__(self, uri, transport=None, encoding=None, verbose=0,
>>>> + allow_none=1):
>>>> + if transport == None:
>>>> + protocol = uri.split(':')[0]
>>>> + if protocol == 'httpu':
>>>> + uri = 'http:' + ':'.join(uri.split(':')[1:])
>>>> + transport = UnixTransport()
>>>>
>>> How about
>>>
>>> (protocol, rest) = uri.split(':', 1)
>>> if protocol == 'httpu':
>>> uri = 'http:' + rest
>>> transport = UnixTransport()
>>>
>> hum, do we really need to invent a new transport for local access ?
>> I don't remember seeing 'httpu' anywhere, sounds weird to me
>>
>
> httpu is HTTP over a unix domain socket, as opposed to over TCP. It's
> used elsewhere (though not widely, obviously). It gives you basic
> protection from non-root users (see your complaint above).
>
>
>> [...]
>>
>>>> except SystemExit:
>>>> + sys.exit(1)
>>>> + except xmlrpclib.Fault, ex:
>>>> +# print "Xend generated an internal fault:"
>>>> +# sys.stderr.write(ex.faultString)
>>>> +# sys.exit(1)
>>>> + print "Error: Internal Xend error"
>>>>
>>> I expect we can do better than just printing "Internal Xend Error". How
>>> much structure and useful information is there in an xmlrpclib.Fault at
>>> the moment?
>>>
>> Another good question, as we are defining an API to Xend I think
>> the error handling question will become more and more important. The client
>> will need more structure and informations about processing error, the
>> full stack trace within xend might not be that useful (except for low level
>> debugging) to the clients, but currently I just extract a string like
>> "No such domain test"
>> which is a bit hard to process correctly even in context. A list of predefined
>> error code and meaning could help quite a bit along with just the error message.
>>
>
> Sure. Do you have a list of error codes already (for libvirt, for
> example)?
>
> Ewan.
>
next prev parent reply other threads:[~2006-03-12 1:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-07 23:37 [RFC] Xend XML-RPC Refactoring Ian Pratt
2006-03-08 0:07 ` Anthony Liguori
2006-03-11 20:55 ` Ewan Mellor
2006-03-11 21:36 ` Daniel Veillard
2006-03-11 22:20 ` Ewan Mellor
2006-03-12 1:46 ` Anthony Liguori [this message]
2006-03-12 9:27 ` Daniel Veillard
2006-03-12 9:57 ` Daniel Veillard
2006-03-12 17:41 ` Anthony Liguori
2006-03-12 18:29 ` Daniel Veillard
2006-03-12 20:28 ` Anthony Liguori
2006-03-12 21:49 ` Daniel Veillard
2006-03-12 1:44 ` Anthony Liguori
2006-03-13 10:30 ` Ewan Mellor
2006-03-14 6:58 ` Anthony Liguori
2006-03-14 8:35 ` Ewan Mellor
-- strict thread matches above, loose matches on Subject: below --
2006-01-31 21:25 Anthony Liguori
2006-01-31 21:36 ` Ronald G Minnich
2006-01-31 21:47 ` Matt Sottile
2006-01-31 21:58 ` Anthony Liguori
2006-02-01 9:53 ` Ewan Mellor
2006-02-01 9:37 ` Daniel Veillard
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=44137D7B.7050403@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=ewan@xensource.com \
--cc=m+Ian.Pratt@cl.cam.ac.uk \
--cc=veillard@redhat.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.