<div dir="ltr">Hi Serge,<div><br></div><div style>Yeah you are correct we need regular users to be able to monitor their own containes. I guess we can encrypt the messages but I'm not going there :)</div><div style><br>

</div><div style>Cheers,</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 8:52 AM, Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Quoting S.Çağlar Onur (<a href="mailto:caglar@10ur.org">caglar@10ur.org</a>):<br>
> Hi there,<br>
><br>
> What about using AF_INET but binding a restricted port while adding a new<br>
> field to the message? As an example we can start to create a hmac (or<br>
> something like that) per container in the creation time and save that into<br>
> LXCPATH/CONTAINERNAME/hmac. Then both client (can add that value to<br>
> message) and server (can read from filesystem to check authenticity of the<br>
> file) can use it.<br>
><br>
> By binding a restricted port we guarantee that regular users cannot sniff<br>
> the traffic and by using the filesystem permissions we provide the desired<br>
> separation?<br>
<br>
</div>But we want regular users to be able to monitor their own containers.<br>
<br>
Now I suppose we could require an extra netns layer where an<br>
unprivileged user must first create a new userns, create a new<br>
netns in that, and start containers from there.  Then he has<br>
privilege over restricted ports in that netns, so he can monitor<br>
containers created from there.  It also gives a somewhat simple<br>
way to provide networking to unprivileged-user-created containers-<br>
simply have a privileged init script create the userns+netns for<br>
the user, keeping it open, create a NIC in there and hook it into<br>
a host bridge (since this init job is privileged on the host), then<br>
hand the setns fd to the user (by bind-mounting into a DAC-protected<br>
directory like /lxc/ns/$USER/).  Now the user can setns into<br>
/lxc/ns/$user before running any lxc commands.  It's quite different<br>
from what I was earlier envisioning, but doable.  Disclaimer:  I'm<br>
groggy this morning, so might be talking sillyness.<br>
<span class="HOEnZb"><font color="#888888"><br>
-serge<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>S.Çağlar Onur <<a href="mailto:caglar@10ur.org">caglar@10ur.org</a>>
</div>