使用omniauth集成Crowd認證
參考鏈接:Atlassian Crowd OmniAuth Provider
環境
atlassian crowd 3.2.1
bitnami gitlab 11.9.8
配置說明
只需要修改 /etc/gitlab/gitlab.rb
gitlab_rails['omniauth_allow_single_sign_on'] = ['crowd']
gitlab_rails['omniauth_sync_email_from_provider'] = ['crowd']
gitlab_rails['omniauth_sync_profile_attributes'] = ['name','email']
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_auto_link_ldap_user'] = true
gitlab_rails['omniauth_providers'] = [
{
"name" => "crowd",
"args" => {
"crowd_server_url" => "http://mycrowd.local:8095/crowd",
"application_name" => "gitlab",
"application_password" => "MyPassword"
}
}
]
使用羣暉域認證
參考鏈接:How to configure LDAP with GitLab CE
環境
Synology Active Directory Server
bitnami gitlab 11.9.8
配置說明
只需要修改 /etc/gitlab/gitlab.rb
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'mydomain.com'
host: '192.168.1.x'
port: 636
uid: 'sAMAccountName'
encryption: 'simple_tls' # "start_tls" or "simple_tls" or "plain"
bind_dn: 'CN=gitlab,DC=mydomain,DC=com' #新建gitlab用戶,域管理員?
password: 'MyPassword' #gitlab口令
verify_certificates: false #自簽名證書必須false,否則出錯
active_directory: true
allow_username_or_email_login: true #忽略第一個@後面的內容
base: 'OU=IT,DC=mydomain,DC=com' #利用OU可以篩選組
EOS