GitLab11.3.9 使用 Crowd3.3.2 的帐号实现 SSO 单点登录,以及GitLab配置腾讯企业邮箱

GitLab11.3.9 的安装方法: 点击查看
  Crowd3.3.2 的安装方法:点击查看

需要先在 Crowd 创建应用程序,参考 <Docker 创建 Crowd3.3.2 以及打通 Jira Software7.12.3和Confluence6.12.2 SSO 单点登录> 中的 4.12章节,在 Application type 选择 Generic Application, Description 输入Gitlab ApplicatonName 输入 gitlabPassword 输入 123456,然后点击 Next,其他步骤参考 4.12章节
  gitlab-1

GitLabCrowd 打通需要修改 gitlab.rb
  修改后的内容如下:

external_url 'http://localhost/'
gitlab_rails['initial_root_password'] = File.read('/run/secrets/gitlab_root_password')

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "test@mshk.top"
gitlab_rails['smtp_password'] = "email password"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] = 'test@mshk.top'
gitlab_rails['smtp_domain'] = "exmail.qq.com"


gitlab_rails['omniauth_enabled'] = true 
gitlab_rails['omniauth_allow_single_sign_on'] = true 
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_providers'] = [
     {
       "name" => "crowd",
       "args" => {
         "crowd_server_url" => "http://crowd.mshk.top/crowd",
         "application_name" => "gitlab",
         "application_password" => "123456"
       }
     }
   ]

crowd_server_url修改成你的 Crowd 地址

修改以后,进行到容器中执行命令进行重置配置,并重启 gitlab 服务:

$ gitlab-ctl reconfigure && gitlab-ctl stop && gitlab-ctl start

重启以后,就可以使用 Crowd 中配置的帐号,进行登录。


博文作者:迦壹
博客地址:GitLab11.3.9 使用 Crowd3.3.2 的帐号实现 SSO 单点登录,以及GitLab配置腾讯企业邮箱
转载声明:可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明,谢谢合作!

比特币地址:1KdgydfKMcFVpicj5w4vyn3T88dwjBst6Y
以太坊地址:0xbB0a92d634D7b9Ac69079ed0e521CC2e0a97c420


posted @ 2018-12-13 10:27  Lion  阅读(1274)  评论(0编辑  收藏  举报