<div dir="ltr"><div class="gmail_extra">You are right. Failing just a GETSPEC would still allow client to connect to the volume directly when by using a volfile. We can prevent this by also setting &#39;auth.reject *&#39; on the volume. The username/password based authentication has higher priority than auth.reject or auth.allow, so all the trusted clients within the pool would still be able to connect to the bricks and do their job.</div><div class="gmail_extra"><br></div><div class="gmail_extra">~kaushal</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 2:21 AM, Niels de Vos <span dir="ltr">&lt;<a href="mailto:ndevos@redhat.com" target="_blank">ndevos@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Thu, Jan 22, 2015 at 08:40:30PM +0530, Deepak Shetty wrote:<br>
&gt; I didn&#39;t understand how the brick process point is relevant here ? Can you<br>
&gt; elaborate pls ?<br>
&gt; If we are failing the GETSPEC itself there shouldn&#39;t be any question of<br>
&gt; client connecting to the brick process, no ?<br>
&gt;<br>
&gt; I don&#39;t have much insights into the code but I am just thinking logically<br>
&gt; and saying the above<br>
<br>
</span>Well, failing the GETSPEC will prevent the standard usage from<br>
connecting to the bricks. But, in case the client uses a .vol file<br>
directly, GETSPEC is not used (I assume, but could be wrong). </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Because a .vol file can contain the &#39;trusted&#39; credentials, I am of the<br>
opinion that when &#39;disabling&#39; the GlusterFS protocol, the bricks should<br>
only accept connections with those trusted credentials.<br>
<br>
That way self-heal and all can still do their work (they run inside the<br>
Trusted Pool that receives the trusted credentials with GETSPEC).<br>
<br>
Clients that still have an old .vol file will be denied access, because<br>
those clients were not in the Trusted Pool and hence do not have the<br>
trusted credentials.<br>
<br>
Is is it a little clearer with this example? If not, let me know :)<br>
<span class=""><font color="#888888"><br>
Niels<br>
</font></span><div class=""><div class="h5"><br>
&gt;<br>
&gt; thanx,<br>
&gt; deepak<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Jan 21, 2015 at 2:03 PM, Niels de Vos &lt;<a href="mailto:ndevos@redhat.com">ndevos@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; On Wed, Jan 21, 2015 at 11:19:14AM +0530, Deepak Shetty wrote:<br>
&gt; &gt; &gt; Good point and I agree to the below.<br>
&gt; &gt; &gt; So all we need here is a way to differentiate trusted Vs non-trusted<br>
&gt; &gt; &gt; clients and fail GETSPEC if it comes from non-trusted client provided the<br>
&gt; &gt; &gt; disable glusterfs protocol option has been set ?<br>
&gt; &gt;<br>
&gt; &gt; Not only that.<br>
&gt; &gt;<br>
&gt; &gt; I would expect that the brick processes only allow access when the<br>
&gt; &gt; trusted-*.vol file is used to connect. That .vol file (obtained through<br>
&gt; &gt; GlusterD) contains a user/passwd (both UUIDs). If the connecting client<br>
&gt; &gt; does not pass the user/passwd to the brick process on connect,<br>
&gt; &gt; connections should be denied.<br>
&gt; &gt;<br>
&gt; &gt; I must admit that I have never looked at how/when the client passes<br>
&gt; &gt; these credentials to the bricks.<br>
&gt; &gt;<br>
&gt; &gt; Niels<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Wed, Jan 21, 2015 at 8:42 AM, Vijay Bellur &lt;<a href="mailto:vbellur@redhat.com">vbellur@redhat.com</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On 01/19/2015 06:22 PM, Deepak Shetty wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; Hi All,<br>
&gt; &gt; &gt; &gt;&gt;    I had opened this feature request sometime back<br>
&gt; &gt; &gt; &gt;&gt; <a href="http://www.gluster.org/community/documentation/index" target="_blank">http://www.gluster.org/community/documentation/index</a>.<br>
&gt; &gt; &gt; &gt;&gt; php/Features/turn-off-glusterfs-proto-access<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; I wanted to know what would be the right way to implement this ?<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; The goal here is to have a volume set option to turn off<br>
&gt; &gt; glusterfs/fuse<br>
&gt; &gt; &gt; &gt;&gt; protocol access<br>
&gt; &gt; &gt; &gt;&gt; just like how we have it today for NFS ( volume set nfs.export-volumes<br>
&gt; &gt; &gt; &gt;&gt; off)<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; 1) Does GETSPEC allow passing the protocol being requested at mount,<br>
&gt; &gt; so<br>
&gt; &gt; &gt; &gt;&gt; that glusterd can return success/failure and mount.gluster can error<br>
&gt; &gt; &gt; &gt;&gt; accoridngly ?<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; 2) Another way is to introduce another handshake after GETSPEC is<br>
&gt; &gt; &gt; &gt;&gt; successfull, where client can request permission to mount using the<br>
&gt; &gt; said<br>
&gt; &gt; &gt; &gt;&gt; protocol and glusterd returns success/failure based on the volume set<br>
&gt; &gt; &gt; &gt;&gt; option being set or unset ?<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; Thoughts ?<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I think unconditionally disabling glusterfs protocol for trusted<br>
&gt; &gt; clients<br>
&gt; &gt; &gt; &gt; (clients local to the storage pool) also would not be ideal. An<br>
&gt; &gt; &gt; &gt; administrator might still want to access volumes through a trusted<br>
&gt; &gt; &gt; &gt; glusterfs client for maintenance, repair activities. Geo-replication,<br>
&gt; &gt; quota<br>
&gt; &gt; &gt; &gt; etc. do rely on the ability to access volumes from the trusted storage<br>
&gt; &gt; pool<br>
&gt; &gt; &gt; &gt; through the native glusterfs protocol for proper functioning.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Given this, we could implement this feature by serving volfiles to only<br>
&gt; &gt; &gt; &gt; trusted clients in glusterd and fail requests from everywhere else if<br>
&gt; &gt; an<br>
&gt; &gt; &gt; &gt; option to disable glusterfs protocol has been set. This way all<br>
&gt; &gt; services<br>
&gt; &gt; &gt; &gt; accessing volumes locally from the trusted storage pool will continue<br>
&gt; &gt; to<br>
&gt; &gt; &gt; &gt; function without any problems.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; HTH,<br>
&gt; &gt; &gt; &gt; Vijay<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; &gt; <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
</div></div><br>_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
<br></blockquote></div><br></div></div>