Authentication/access control module for reverse proxy NGINX

Jun Chen acgtek at
Wed Feb 22 22:16:13 UTC 2017

Hi everyone,
I am looking for a module which does the authentication/access control for reverse proxy (preferable `nginx`). This module should do:

    1. user authentication using credential stored in database (such as postgres)
    2. Monitoring the ongoing connection and take action if certain access credential is met. For example, time is expired
    3. open source (allow customization) and nginx, ruby(rails) preferable. 

It seems that [`OpenResty`][1] with `nginx` can do the job. Here is an [article][2] talking about access control with `Lua` on `nginx`. Here is an example (`nginx and Lua`) giving me impression that a snippet of file could executed for access (`access_by_lua_file`):

    server {
        listen 8080;
        location / {
          auth_basic           "Protected Elasticsearch";
          auth_basic_user_file passwords;
          access_by_lua_file '../authorize.lua';  #<<<=====
          proxy_pass http://elasticsearch;
          proxy_redirect off;

I am new to access control with reverse proxy. Any thought is appreciated.

  [2]: Playing HTTP Tricks with Nginx

|   |    |


|   |  
Playing HTTP Tricks with Nginx
 Update November 2, 2015: If you're interested in advanced access control configuration or other security fea...  |   |



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list