【问题标题】:Authentication/access control module for reverse proxy NGINX反向代理 NGINX 的认证/访问控制模块
【发布时间】:2017-07-05 00:50:26
【问题描述】:

我正在寻找一个对反向代理进行身份验证/访问控制的模块(最好是nginx)。这个模块应该做:

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. 

似乎OpenRestynginx 可以完成这项工作。这是articlenginx 上与Lua 谈论访问控制。这是一个示例 (nginx and Lua) 给我的印象是可以执行文件的 sn-p 以进行访问 (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;
    }

  }

我是使用反向代理进行访问控制的新手。任何想法表示赞赏。

【问题讨论】:

    标签: ruby-on-rails ruby nginx lua reverse-proxy


    【解决方案1】:

    这是 nginx 网站上的一个有趣的article,它回答了上述问题。 https://www.nginx.com/blog/nginx-plus-authenticate-users/

    【讨论】:

      猜你喜欢
      • 2017-06-15
      • 2022-06-10
      • 2013-01-28
      • 1970-01-01
      • 2021-01-10
      • 1970-01-01
      • 2013-05-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多