put these lines in /etc/gitlab/gitlab.rb
# OmniAuth Configuration
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_external_providers'] = ['saml']
gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
gitlab_rails['omniauth_sync_email_from_provider'] = 'saml'
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_auto_link_ldap_user'] = false
gitlab_rails['omniauth_sync_profile_from_provider'] = ['saml']
gitlab_rails['omniauth_sync_profile_attributes'] = ['email']
gitlab_rails['omniauth_auto_link_saml_user'] = true
# Uncomment this once you 100% ready to use SSO
# gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'saml'
gitlab_rails['omniauth_providers'] = [
{
# G-Suite
'name': 'saml',
'args': {
'assertion_consumer_service_url': 'https://git.smart24x7.com/users/auth/saml/callback',
# 'idp_cert_fingerprint': '9B:70:E8:5E:FA:7C:F3:05:4E:CA:30:23:BE:46:E3:6A:55:78:06:91:9B:C6:E6:21:47:26:62:6D:CC:6C:9A:07',
idp_cert: '-----BEGIN CERTIFICATE-----MIIDdDCCAlygAwIBAgIGAXIsPmZ6MA0GCSqGSIb3DQEBCwUAMHsxFDASBgNVBAoTC0dvb2dsZSBJbmMuMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MQ8wDQYDVQQDEwZHb29nbGUxGDAWBgNVBAsTD0dvb2dsZSBGb3IgV29yazELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEwHhcNMjAwNTE5MDkyMzA0WhcNMjUwNTE4MDkyMzA0WjB7MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEPMA0GA1UEAxMGR29vZ2xlMRgwFgYDVQQLEw9Hb29nbGUgRm9yIFdvcmsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnelFjYi6oHajsfWI7HGYe7mewrLMc0wQrvCmfenXrXoffpt7rpAV1RJcFkf1A3FPdRTnHnb3k3ICQbiTPQhpqRT4w1NiqrS/aIbb8SaugcxNl3brAvD71xrjRFXwv6A84A7cRV1grfMumPImcQxXrcWevtZOSKflmyK9h5/Xf8hs45qtJTTyLVkLS8HSzRxOyis2+DJRVY5uibWJ3esYT8tDVluZlf718sUyxfz1x7NziBaA9C6uLg+OKziypVF/EjkyqrwWWXpaOOgp2IQS1yopN2A0NlBD1xCGgMl7sYs02ihpvns733XwavtolaEoUYU+MIB57XMsMSUo/7t1SQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBDC/0mfjvI11Q0QQZuLgjl+lxQ6AvF1xQ3YgonxZu/2SIo4Y6hBnNVha0bxadIolEvTjgZz4xoUmF65X3PZIvJJhQLOihtPohpPqcd5ygw0yHk0QByntMdmcxQQu7jhyd9xzn7xUzLQRhRcA1nVP7gC1UrqFpK94WVJG5MBSctrtAV0JF7Dz0sPaIlnOE21qCaCEn597oU9hmv0QovSZFuoEIgM8GTs5nSnvaQ1Zxl3r+1gb4MvgJ3jxgwZFkWH+ou5TMHNTtICafcHCd9Xa9a8Qx9jwW1RpCnYsUomrTLQ0/XGl8iwpa1BJWkJITabolqEnqGhz2uXn016L+ssp74-----END CERTIFICATE-----',
# 'idp_cert_fingerprint': '9B:70:E8:5E:FA:7C:F3:05:4E:CA:30:23:BE:46:E3:6A:55:78:06:91:9B:C6:E6:21:47:26:62:6D:CC:6C:9A:07',
'idp_sso_target_url': 'https://accounts.google.com/o/saml2/idp?idpid=C00xj3iy8',
'issuer': 'https://git.smart24x7.com',
'name_identifier_format': 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
'attribute_statements': { 'email': ['emailAddress'] }
},
'label': 'G Suite'
}
]