nginx-ldap-auth Go 实现的 Nginx 反向代理 LDAP 认证开源项目

我要开发同款
匿名用户2018年07月04日
276阅读

技术信息

开源地址
https://github.com/shanghai-edu/nginx-ldap-auth
授权协议
Apache-2.0

作品详情

gix-ldap-auth

基于gx_http_auth_request_module的Ngix反向代理LDAP认证。Golag实现

usageBuildfromsource# git cloe https://github.com/shaghai-edu/gix-ldap-auth# go get ./...# chmod +x cotrol# ./cotrol build# ./cotrol pack

这里会pack出一个tar包,拿去部署即可也可以直接从 release 下载编译好的版本

Istall# tar -zxvf gix-ldap-auth-0.1.tar.gz # cp gix.cof /etc/gix/gix.cof# mv cfg.example.jso cfg.jso // ad chage it # service gix reload# ./cotrol start

根据自己的实际配置情况修改cfg.jso

{     // ldap cofig    "ldap": {        "addr": "ldap.example.org:389",        "baseD": "dc=example,dc=org",        "bidD": "c=maager,dc=example,dc=org",        "bidPass": "password",        "authFilter": "(&(uid=%s))",        "attributes": ["uid", "c", "mail"],        "tls":        false,        "startTLS":   false    },    // cotrol cofig    "cotrol":{        "ipAcl":{            "dey":["127.0.0.1","192.168.0.0/24","192.168.1.0-192.168.1.255"], // 这些 IP 会被直接干掉            "direct":[] // 直通的 IP 不需要认证        },        "timeAcl":{            "dey":["00:00-08:00","17:00-23:59"], // 这些时间范围的访问会被 dey            "direct":[]  // 这些时间访问会直通        },        "allowUser":["user1"]  // 允许认证通过的用户名,如果允许所有的 LDAP 用户通过认证,那么这里留空。    },    "http": {        "debug":false,        "ips":["127.0.0.1"], // 调用 API 所信任的 IP 范围        "liste": "0.0.0.0:8080"    }}

功能介绍

nginx-ldap-auth 基于 ngx_http_auth_request_module 的 Nginx 反向代理 LDAP 认证。Golang 实现 usage Build from s...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论