gpt4 book ai didi

ruby - 使用 SAML 连接 GitLab 帐户

转载 作者:数据小太阳 更新时间:2023-10-29 08:03:24 25 4
gpt4 key购买 nike

我正在尝试对 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 登录时出现错误

Signing in using your Saml account without a pre-existing GitLab account is not allowed. Create a GitLab account first, and then connect it to your Saml account.

我已经创建了一个名为 user1@mycompany.com 的 Git 用户

如何修复此错误?

最佳答案

更改这些参数得到修复。

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

关于ruby - 使用 SAML 连接 GitLab 帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33024270/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com