<div dir="ltr">Perhaps you could edit svcstatus.sh, and have it cross-check the REMOTE_USER or REMOTE_GROUP value against the HOST part of the QUERY_STRING.  This is made significantly simpler if the username/groupname is the client device domain name, in which case, something like this might work:<div><br></div><div><div>#!/bin/sh</div><div><br></div><div># This is a wrapper for the Xymon svcstatus.cgi script</div><div><br></div><div><div>echo "$QUERY_STRING" | sed -n '/^HOST=[-_a-z0-9.]*'"$REMOTE_USER"'&SERVICE=[^&]*$/p' | grep ^ >/dev/null || {</div><div>    echo "Sorry, you don't have access to this page"</div><div>    exit 1</div><div>}</div></div><div><br></div><div>. /usr/lib/xymon/server/etc/cgioptions.cfg</div><div> exec /usr/lib/xymon/server/bin/svcstatus.cgi $CGI_SVC_OPTS</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 July 2015 at 23:05, Bruno Deschamps <span dir="ltr"><<a href="mailto:bruno@redix.com.br" target="_blank">bruno@redix.com.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,</p>
<p><br>
</p>
<p>Im using xymon to monitoring my clients servers.</p>
<p><br>
</p>
<p>The clients access the xymon on the URL like above:</p>
<p><br>
</p>
<p><a href="http://host.com/client1" target="_blank">http://host.com/client1</a></p>
<br>
<p><a href="http://host.com/client1" target="_blank">http://host.com/client</a>2<br>
<br>
</p>
<p><a href="http://host.com/client1" target="_blank">http://host.com/client</a>3<br>
<br>
</p>
<p><br>
</p>
<p>Every client has his own directory for all servers.</p>
<p>When the client access the directory client1 for example, i use a .htpasswd to authenticate the user. The user only has access to his directory</p>
<p>I notice that there is a security problem for a specific item link like above:</p>
<p><a href="http://host.com/cgi/svcstatus.sh?HOST=server1.client1.com&SERVICE=files" title="http://host.com/cgi/svcstatus.sh?HOST=server1.client1.com&amp;SERVICE=files
Ctrl+Clique ou toque para seguir o link" target="_blank">http://host.com/cgi/svcstatus.sh?HOST=server1.client1.com&SERVICE=files</a><br>
<br>
</p>
<p>If im logged with user client1 i can see the item correctly, but if i manually  change the url for another client, like somenting:</p>
<p><a href="http://host.com/cgi/svcstatus.sh?HOST=server2.client2.com&SERVICE=files" target="_blank">http://host.com/cgi/svcstatus.sh?HOST=server2.client2.com&SERVICE=files</a><br>
<br>
</p>
<p>I can see the content of another client.</p>
<p><br>
</p>
<p>There is a way to restrict or block the access from users that dont have permission?</p>
<p><br>
</p>
<p>Att</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<img></div>
</div>
</div>
</div>

<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br></div>