Sign inSign up

ifintech/ldap2http

By ifintech

Updated about 9 years ago

ldap2http

Image
0

1.1K

ifintech/ldap2http repository overview

简介

将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.1ldap服务监听的ip,例:127.0.0.1
port监听端口10389ldap服务监听的端口号,建议使用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使用

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

参考文档

Tag summary

Content type

Image

Digest

Size

6 MB

Last updated

about 9 years ago

docker pull ifintech/ldap2http