将ldap协议的请求转发给后端的HTTP协议的用户授权中心认证
docker启动方式:
构建
docker build -t ldap .
启动
docker run -d --env HOST=0.0.0.0 --env PORT=10389 --env AUTH_URL=https://auth.com --env AUTH_TOKEN=demo_token --name ldap ldap
容器内部启动方式:
ldap-auth -host=0.0.0.0 -port=10389 -auth_url=https://auth.com -auth_token=demo_token &
| 参数名 | 意义 | 默认值 | 备注 |
|---|---|---|---|
| host | 监听host地址 | 127.0.0.1 | ldap服务监听的ip,例:127.0.0.1 |
| port | 监听端口 | 10389 | ldap服务监听的端口号,建议使用10389 |
| auth_url | 统一认证授权中心服务路径 | https://127.0.0.1/ | 员工授权服务地址的倒数第二级路径,例:假设服务路径为 https://auth.com/api/auth ,则auth_url为 https://auth.com/api (去掉/auth) |
| auth_token | 用户信息查询服务密钥 | token | 配置在统一认证授权中心conf/security/api.php文件中的ldap.password项 |
gitlab.yml配置示范
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS # remember to close this block with 'EOS' below
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: '0.0.0.0'
port: 10389`
uid: 'sAMAccountName'
method: 'plain' # "tls" or "ssl" or "plain"
base: 'OU=People,DC=auth,DC=democompany,DC=com'
bind_dn: '[email protected],OU=People,DC=auth,DC=democompany,DC=com'
password: 'password'
user_filter: ''
active_directory: false
EOS
参考文档
Content type
Image
Digest
Size
6 MB
Last updated
about 9 years ago
docker pull ifintech/ldap2http