Nginx – ngx_http_auth_request_module equivance for HAProxy

apache-2.2haproxyhttp-authenticationnginx

Does an equivalent module to nginx's ngx_http_auth_request_module exist for HAProxy or Apache? This module allows support for custom authentication through HTTP. I quote:

The ngx_http_auth_request_module module (1.5.4+) implements client authorization based on the result of a subrequest. If the subrequest returns a 2xx response code, the access is allowed. If it returns 401 or 403, the access is denied with the corresponding error code. Any other response code returned by the subrequest is considered an error.

Best Answer

At least for apache (both 1.x and 2.x) you can try out https://github.com/kitech/mod_authnz_external. It runs an external script to handle user's credentials. This script in turn may query an external service over HTTP[s], in this case it would work similarly (not considering performance issues) to ngx_http_auth_request_module

Related Topic