我正在寻找一个模块,它为反向代理(优选nginx)进行身份验证/访问控制.该模块应该:1. user authentication using credential stored in database (such as postgres)2. Monitoring the ongoing connection and take ...
我正在寻找一个模块,它为反向代理(优选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.
似乎OpenResty与nginx可以完成这项工作.这是article在nginx上讨论Lua的访问控制.这是一个示例(nginx和Lua),给我的印象是可以执行访问的文件片段(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;
}
}
我是反向代理访问控制的新手.任何想法都表示赞赏.
解决方法:
这是nginx网站上一个有趣的article,它回答了上面的问题. https://www.nginx.com/blog/nginx-plus-authenticate-users/
编程基础网
本文标题为:ruby-on-rails – 用于反向代理NGINX的认证/访问控制模块
基础教程推荐
猜你喜欢
- R语言中corrplot标题居中及eps格式输出 2022-12-08
- 第02部分 Go开发学习 第3章 计算机组成原理快速扫盲 2023-09-05
- Swift使用表格组件实现单列表 2023-07-08
- R语言数据结构之矩阵、数组与数据框详解 2022-12-18
- 汇编实现的memcpy和memset的方法 2023-07-06
- 详解Golang中NewTimer计时器的底层实现原理 2023-07-25
- Swift实现表格视图单元格多选 2023-07-08
- R语言学习ggplot2绘制统计图形包全面详解 2022-12-08
- swift中自定义正则表达式运算符=~详解 2023-07-06
- 用汇编语言实现从1加到100的方法(1+2+...+100) 2023-07-06
