Skip to contentSkip to conversation

Is it possible to access XenStore remotely?

DISCUSSION weiming 6 participants 8 messages Aug 20, 2009 – Aug 25, 2009 3 messages not in the archive

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · weiming

Hi,

Is it possible to read/write the xenstore from another physical machine?

I know it uses Unix socket. So it looks hard to access it remotely, isn't it?

Hi weiming,

whilst it's not possible at the moment and certainly a bad idea security wise, make xenstored listen on a tcp socket along with the unix socket is very easy.

cheers,
--
Vincent

author
#2 lore raw

Hi VIncent,

Yes, I'm considering adding a TCP socket for xenstored.

Since xen apis can be called remotely, there's no reason to prevent accessing xenstore in the same way.

thanks,
Weiming

Quoted 11 lines · Vincent Hanquez
Quoted 7 lines · weiming

Hi,

Is it possible to read/write the xenstore from another physical machine?

I know it uses Unix socket. So it looks hard to access it remotely, isn't it?

Hi weiming,

Quoted 9 lines

whilst it's not possible at the moment and certainly a bad idea security wise, make xenstored listen on a tcp socket along with the unix socket is very easy.

cheers,
--
Vincent

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw

Hi,

Quoted 6 lines · weiming

Hi VIncent,

Yes, I'm considering adding a TCP socket for xenstored.

Since xen apis can be called remotely, there's no reason to prevent accessing xenstore in the same way.

We did this when working on an experiment to use Xen on a single system image. Our implementation utilized a private back-end LAN which was not exposed to dom-u's that faced the public, so no authentication mechanism was needed. We needed to set up remote watches to facilitate a sort of 'cluster wide upstart for xen'.

I would warn you, XenStore is fragile and often fickle, I've crashed it many times within a guest while working on split drivers for various character devices.

If you expose it via sockets, without having the API as a buffer to take most 'brute force' abuse, be sure to code very defensively and utilize iptables to restrict access. While xend can be re-started , xenstored can not.

Yes, API's can be called remotely, however some diligence prevails before the API actually talks to xenstore.

Cheers,
--Tim

Quoted 30 lines

thanks,
Weiming

On Thu, Aug 20, 2009 at 5:24 AM, Vincent Hanquez
<[email protected]> wrote:

weiming wrote:
Hi,

Is it possible to read/write the xenstore from another physical machine?

I know it uses Unix socket. So it looks hard to access it remotely, isn't it?
Hi weiming,

whilst it's not possible at the moment and certainly a bad idea security wise, make xenstored listen on a tcp socket along with the unix socket is very easy.

cheers,
--
Vincent

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 1 line
Monkey + Typewriter = Echoreply ( http://echoreply.us )

A message that is not in the archive (sent off-list or not yet received): 1251118999.5532.84.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#5 lore raw

Tim Post writes ("Re: [Xen-devel] Is it possible to access XenStore remotely?"):

Quoted 3 lines

I would warn you, XenStore is fragile and often fickle, I've crashed it many times within a guest while working on split drivers for various character devices.

If xenstored can be crashed then we should fix it. Can you remember any of the things which caused it to fall over ?

Ian.

A message that is not in the archive (sent off-list or not yet received): 19090.47695.114710.46450-msK/[email protected]

#7 lore raw
Quoted 10 lines · Ian Jackson

Tim Post writes ("Re: [Xen-devel] Is it possible to access XenStore remotely?"):

Quoted 4 lines

I would warn you, XenStore is fragile and often fickle, I've crashed it many times within a guest while working on split drivers for various character devices.

If xenstored can be crashed then we should fix it. Can you remember any of the things which caused it to fall over ?

or we could just install the ocaml implementation by default. it has already proven to be a lot better security wise.

(it's still interesting to know what caused the crash, so we can probably add that to some kind of harness)

Signature · 1 line
Vincent
#8 lore raw
In reply to Ian Jackson

Ian,

Quoted 7 lines · Ian Jackson

Tim Post writes ("Re: [Xen-devel] Is it possible to access XenStore remotely?"):

Quoted 3 lines

I would warn you, XenStore is fragile and often fickle, I've crashed it many times within a guest while working on split drivers for various character devices.

If xenstored can be crashed then we should fix it. Can you remember any of the things which caused it to fall over ?

Mostly, it was run away writers caught in a brain dead loop. It was not difficult to DoS the store from within a guest accidentally or deliberately.

I also remember using watches on a single key that changed frequently without using xs_read_watch() since I already knew what fired, that caused a total crash of xenstored.

I've also had xs_transaction_end() return -EAGAIN frequently on busy systems.

The ocaml version of xenstored is much more resilient to abuse, be it accidental or deliberate.

Cheers,
--Tim

Signature · 1 line
Monkey + Typewriter = Echoreply ( http://echoreply.us )

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw

weiming writes ("Re: [Xen-devel] Is it possible to access XenStore remotely?"):

Quoted 1 line

Yes, I'm considering adding a TCP socket for xenstored.

As Jean says, this is easy but probably unwise.

Quoted 2 lines

Since xen apis can be called remotely, there's no reason to prevent accessing xenstore in the same way.

You will need to think about access control. I don't think we will be accepting any patches to implement the more complex access control which will be necessary, so you'll be maintaining a private branch.

Ian.