<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 7, 2014 at 5:41 PM, Stephen Gran <span dir="ltr"><<a href="mailto:stephen.gran@theguardian.com" target="_blank">stephen.gran@theguardian.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Given that Yuriy says explicitly 'unix socket', I dont think he means 'MQ' when he says 'RPC'.  I think he just means a daemon listening on a unix socket for execution requests.  This seems like a reasonably sensible idea to me.<br>

</blockquote><div><br></div><div>Yes, you're right.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
On 07/03/14 12:52, Miguel Angel Ajo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I thought of this option, but didn't consider it, as It's somehow<br>
risky to expose an RPC end executing priviledged (even filtered) commands.<br></blockquote></div></blockquote><div><br></div><div>subprocess module have some means to do RPC securely over UNIX sockets. I does this by passing some token along with messages. It should be secure because with UNIX sockets we don't need anything stronger since MITM attacks are not possible.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


If I'm not wrong, once you have credentials for messaging, you can<br>
send messages to any end, even filtered, I somehow see this as a higher<br>
risk option.<br></blockquote></div></blockquote><div><br></div><div>As Stephen noted, I'm not talking about using MQ for RPC. Just some local UNIX socket with very simple RPC over it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And btw, if we add RPC in the middle, it's possible that all those<br>
system call delays increase, or don't decrease all it'll be desirable.<br></blockquote></div></blockquote></div><div class="gmail_extra"><br></div>Every call to rootwrap would require the following.</div><div class="gmail_extra">

<br></div><div class="gmail_extra">Client side:</div><div class="gmail_extra">- new client socket;</div><div class="gmail_extra">- one message sent;</div><div class="gmail_extra">- one message received.</div><div class="gmail_extra">

<br></div><div class="gmail_extra">Server side:</div><div class="gmail_extra">- accepting new connection;</div><div class="gmail_extra">- one message received;</div><div class="gmail_extra">- one fork-exec;</div><div class="gmail_extra">

- one message sent.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This looks like way simpler than passing through sudo and rootwrap that requires three exec's and whole lot of configuration files opened and parsed.<br clear="all">

<div><br></div>-- <br><br><div>Kind regards, Yuriy.</div>
</div></div>