在gitlab上对密钥斗篷进行身份验证后出现错误500

时间:2020-07-23 21:51:02

标签: gitlab keycloak gitlab-omnibus

我用gitlab配置了密钥斗篷。我被路由到keycloak页面,但在通过凭据后得到了错误500。我不知所措,不知道要寻找什么。

gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_allow_single_sign_on'] = ['oauth2_generic']
gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'oauth2_generic'
gitlab_workhorse['env'] = {
  'SSL_CERT_DIR' => '/etc/nginx/ssl'
}
gitlab_rails['omniauth_providers'] = [
{
        'name' => 'oauth2_generic',
        'app_id' => 'gitlab',
        'app_secret' => 'secret key',
        'args' => {
        client_options: {
                'site' => 'https://keycloak:8443', # including port if necessary
                'user_info_url' => '/auth/realms/Demo/protocol/openid-connect/userinfo',
                'authorize_url' => '/auth/realms/Demo/protocol/openid-connect/auth',
                'token_url' => '/auth/realms/Demo/protocol/openid-connect/token',
        },
        user_response_structure: {
        root_path: ['user'], # i.e. if attributes are returned in JsonAPI format (in a 'user' node nested under a 'data' node)
        attributes: { email:'email', first_name:'given_name', last_name:'family_name', name:'name', nickname:'preferred_username' }, # if the nickname attribute of a user is called 'username'
        id_path: 'preferred_username'
        },
        }
}
]

0 个答案:

没有答案