Sunday, February 26, 2017

Authentication/access control module for reverse proxy NGINX

Leave a Comment

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 with nginx can do the job. Here is an article 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.

1 Answers

Answers 1

Here is an interesting article on nginx website which answers the question above. https://www.nginx.com/blog/nginx-plus-authenticate-users/

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment