Ruby 将GitLab帐户与SAML连接

Ruby 将GitLab帐户与SAML连接,ruby,git,gitlab,saml,Ruby,Git,Gitlab,Saml,我正在尝试对GitLab使用SAML身份验证。在gitlab.rb中,我指定了 gitlab_rails['omniauth_enabled'] = true gitlab_rails['omniauth_allow_single_sign_on'] = false gitlab_rails['omniauth_block_auto_created_users'] = false gitlab_rails['omniauth_providers'] = [ { "name"

我正在尝试对GitLab使用SAML身份验证。在gitlab.rb中,我指定了

gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = false
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_providers'] = [
    {
      "name" => "saml",
       args: {
assertion_consumer_service_url: 'https://git.mycompany.com/users/auth/saml/callback',
               idp_cert_fingerprint: 'XX:YY:ZZ',
               idp_sso_target_url: 'https://myidentity.com/SAAS/auth/federation/sso',
               issuer: 'https://git.mycompany.com',
               name_identifier_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'
             }
    }
  ]
现在,当我尝试使用SAML登录时,我得到了一个错误

不允许在没有预先存在的GitLab帐户的情况下使用Saml帐户登录。首先创建GitLab帐户,然后将其连接到Saml帐户

我已经创建了一个名为user1@mycompany.com


如何修复此错误?

更改这些参数可以修复此错误

gitlab_rails['omniauth_allow_single_sign_on'] = true
gitlab_rails['omniauth_block_auto_created_users'] = false

只有参数
gitlab\u rails['omniauth\u allow\u single\u sign\u on']中的
true
才有帮助。 指定的提供程序列表不适用于我。 尝试设置
true
,而不是
['saml','google','bitbucket','gitlab','etc']


在GitLab 12.3上测试,格式可以是特定的:GitLab_rails['omniauth_allow_single_sign_on']=['saml'、'google'、'bitbucket'、'GitLab'、'etc']