[bitnami]Gitlab集成认证

使用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 

你可能感兴趣的:(运行维护)