Bob,
Am 04.09.2018 um 23:27 schrieb Computerisms Corporation:
> First, apologies for the breach in etiquette, will use reply-all on this
> list.
FWIW: I removed Thierry again, because at this point this is no longer
about Lua itself :-)
> After following the thread in github and your hint that a apt-gettable
> package for luasocket exists, I purged everything from luarocks and
> installed from debian repos and the script is no longer producing errors
> and the backend is successfully logging connections.
Perfect!
> A follow up question, if I may: my backend leads to a simple apache
Sure.
> DocumentRoot with auth that works as expected when accessed directly. I
> was expecting when accessing through haproxy that when the auth-request
> script did its subrequest, I would get the apache credentials pop up in
> the browser. However, no pop up happens, and the backend immediately
> fails. Did I misunderstand how this would work?
The only thing my script does is checking the response code of some
subrequest. What you do with it is entirely up to you. The example in
the README on GitHub denies the request.
Instead of denying the request you could select a different backend
(i.e. Apache) which then would be able to show the authentication screen.
In my blog post I use this to force the request to go to OAuth Proxy if
the verification fails:
use_backend oauth_proxy if ! { var(txn.auth_response_successful) -m
bool }
Instead of `oauth_proxy` you would use `auth_request` based on the
configuration you gave previously.
> I thought that maybe the user/pass needs to be included in the url
> (http://user:[email protected]), but the behaviour remains the same....
>
HTTP Basic authentication should work out of the box, because all the
request headers are forwarded to the backend.
Best regards
Tim Düsterhus