<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> squid-users <squid-users-bounces@lists.squid-cache.org> on behalf of Antony Stone <Antony.Stone@squid.open.source.it><br>
<b>Sent:</b> Saturday, December 9, 2017 3:57 PM<br>
<b>To:</b> squid-users@lists.squid-cache.org<br>
<b>Subject:</b> Re: [squid-users] Groups and authorization SQUID</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Saturday 09 December 2017 at 15:35:51, Edwin Quijada wrote:<br>
<br>
> > On Friday 08 December 2017 at 22:08:33, Edwin Quijada wrote:<br>
> > <br>
> > > I have 4 different groups in my company each group has access different<br>
> ><br>
> > Please explain what "access different" means.<br>
> <br>
> The first group has accees to 2 pages, second 3 differents pages and 3 and<br>
> 4 everything<br>
<br>
Okay, understood.<br>
<br>
> > > These groups and users are in a remote server<br>
> ><br>
> > What sort of server? How are the groups defined?<br>
> <br>
> It is a web server<br>
<br>
Er, okay...<br>
<br>
> > > that I use with a webservice<br>
> <br>
> > What does "webservice" mean?<br>
><br>
> Remote method/function that respond me when I sent user/pass this respond<br>
> me with the group that user belongs I have another method/function/script<br>
> by http that respond me what is the group that user belongs<br>
<br>
Okay, I guess it might be possible to get Squid to use ACLs based on the <br>
result of an HTTP request, but I've never seen it done like this before.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">This part is not a problem for me.<br>
<br>
Maybe someone else on the list can suggest how this might be made to work.<br>
<br>
> > > so with I have created a helper for authorization<br>
> ><br>
> > Tell us how this helper works.<br>
> <br>
> I thought that using a helper for autorization I can restricted the pages<br>
> used for each member group<br>
<br>
Have you created a helper, or not? <br>
</div>
<div class="PlainText">Yes!!<br>
<br>
If you have created one, please tell us how it works.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">This helper that I created</div>
<div class="PlainText">
<div><?php<br>
<br>
$f = fopen("php://stdin", "r");<br>
while (!(feof($f))) {<br>
$line = fgets($f);<br>
if ($line) {<br>
$fields = explode(' ', trim($line));<br>
$username = rawurldecode($fields[0]);<br>
$password = rawurldecode($fields[1]);<br>
//<br>
if ($username=="edwin" && $password=="1234")<br>
fwrite(STDOUT, "OK\n");<br>
else<br>
fwrite(STDOUT, "ERR\n");<br>
}<br>
}<br>
?></div>
This helper is just for testing , but when I tested it doent work <br>
<br>
> > How does it identify one group from another?<br>
> <br>
> Uhm...the structere are differents , really there are in different tables<br>
> in my DB that is in the server<br>
<br>
So, you're doing an HTTP request to a web server, which then looks up the user <br>
in a database, and returns a result as an HTTP response...<br>
<br>
Surely it would be easier (and quicker / more efficient) to get Squid to <br>
interrogate the database?<br>
<br>
> > > the problem is how can i do this ACL<br>
<br>
I wouldn't start from there, so I hope someone else here can suggest a way of <br>
getting this to work.<br>
<br>
<br>
What made you start with this approach in the first place?<br>
</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">Now, I changed the approach , I just want one group for everything and other, localnet restricted,instead of use 4 groups just 2 one for admin, other for
<br>
</div>
<div class="PlainText"><br>
</div>
<div class="PlainText"><br>
Antony.<br>
<br>
-- <br>
Atheism is a non-prophet-making organisation.<br>
<br>
Please reply to the list;<br>
please *don't* CC me.<br>
_______________________________________________<br>
squid-users mailing list<br>
squid-users@lists.squid-cache.org<br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" id="LPlnk809088" previewremoved="true">http://lists.squid-cache.org/listinfo/squid-users</a>
<div id="LPBorder_GT_15130240856590.4948536837529187" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15130240856540.8115070518440672" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="TextCell_15130240856550.24096857027955065" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15130240856560.8521522005960064"></div>
<div id="LPTitle_15130240856560.9956802782319097" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15130240856560.41390718042681096" style="text-decoration: none;" href="http://lists.squid-cache.org/listinfo/squid-users" target="_blank">squid-users Info Page</a></div>
<div id="LPMetadata_15130240856580.808434515331647" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.squid-cache.org</div>
<div id="LPDescription_15130240856580.5529085739595717" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
squid-users -- General discussion relating to Squid. The membership of this list is thousands of Squid users from around the world About squid-users</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>