1. See [Initial OmniAuth Configuration](../../integration/omniauth.md#initial-omniauth-configuration) for initial settings to enable single sign-on and add `atlassian_oauth2` as an OAuth provider.
1. See [Configure initial settings](../../integration/omniauth.md#configure-initial-settings) for initial settings to enable single sign-on and add `atlassian_oauth2` as an OAuth provider.
1. See [Initial OmniAuth Configuration](../../integration/omniauth.md#initial-omniauth-configuration) for initial settings to enable single sign-on and add Authentiq as an OAuth provider.
1. See [Configure initial settings](../../integration/omniauth.md#configure-initial-settings) for initial settings to enable single sign-on and add Authentiq as an OAuth provider.
@@ -27,7 +27,7 @@ The OpenID Connect provides you with a client's details and secret for you to us
...
@@ -27,7 +27,7 @@ The OpenID Connect provides you with a client's details and secret for you to us
sudo-u git -H editor config/gitlab.yml
sudo-u git -H editor config/gitlab.yml
```
```
See [Initial OmniAuth Configuration](../../integration/omniauth.md#initial-omniauth-configuration) for initial settings.
See [Configure initial settings](../../integration/omniauth.md#configure-initial-settings) for initial settings.
1. Add the provider configuration.
1. Add the provider configuration.
...
@@ -228,7 +228,7 @@ Azure B2C [offers two ways of defining the business logic for logging in a user]
...
@@ -228,7 +228,7 @@ Azure B2C [offers two ways of defining the business logic for logging in a user]
While cumbersome to configure, custom policies are required because
While cumbersome to configure, custom policies are required because
standard Azure B2C user flows [do not send the OpenID `email` claim](https://github.com/MicrosoftDocs/azure-docs/issues/16566). In
standard Azure B2C user flows [do not send the OpenID `email` claim](https://github.com/MicrosoftDocs/azure-docs/issues/16566). In
other words, they do not work with the [`allow_single_sign_on` or `auto_link_user` parameters](../../integration/omniauth.md#initial-omniauth-configuration).
other words, they do not work with the [`allow_single_sign_on` or `auto_link_user` parameters](../../integration/omniauth.md#configure-initial-settings).
With a standard Azure B2C policy, GitLab cannot create a new account or
With a standard Azure B2C policy, GitLab cannot create a new account or
@@ -29,7 +29,7 @@ When you create an OAuth 2 app in GitHub, you need the following information:
...
@@ -29,7 +29,7 @@ When you create an OAuth 2 app in GitHub, you need the following information:
- The URL of your GitLab instance, such as `https://gitlab.example.com`.
- The URL of your GitLab instance, such as `https://gitlab.example.com`.
- The authorization callback URL; in this case, `https://gitlab.example.com/users/auth`. Include the port number if your GitLab instance uses a non-default port.
- The authorization callback URL; in this case, `https://gitlab.example.com/users/auth`. Include the port number if your GitLab instance uses a non-default port.
See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings.
See [Configure initial settings](omniauth.md#configure-initial-settings) for initial settings.
After you have configured the GitHub provider, you need the following information. You must substitute that information in the GitLab configuration file in these next steps.
After you have configured the GitHub provider, you need the following information. You must substitute that information in the GitLab configuration file in these next steps.
@@ -100,7 +100,7 @@ to authenticate with Kerberos tokens.
...
@@ -100,7 +100,7 @@ to authenticate with Kerberos tokens.
#### Enable single sign-on
#### Enable single sign-on
See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration)
See [Configure initial settings](omniauth.md#configure-initial-settings)
for initial settings to enable single sign-on and add Kerberos servers
for initial settings to enable single sign-on and add Kerberos servers
as an identity provider.
as an identity provider.
...
@@ -137,7 +137,7 @@ with your Kerberos credentials.
...
@@ -137,7 +137,7 @@ with your Kerberos credentials.
The first time users sign in to GitLab with their Kerberos accounts,
The first time users sign in to GitLab with their Kerberos accounts,
GitLab creates a matching account.
GitLab creates a matching account.
Before you continue, review the [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) options in Omnibus and GitLab source. You must also include `kerberos`.
Before you continue, review the [Configure initial settings](omniauth.md#configure-initial-settings) options in Omnibus and GitLab source. You must also include `kerberos`.
@@ -55,7 +55,7 @@ This strategy is designed to allow configuration of the simple OmniAuth SSO proc
...
@@ -55,7 +55,7 @@ This strategy is designed to allow configuration of the simple OmniAuth SSO proc
sudo-u git -H editor config/gitlab.yml
sudo-u git -H editor config/gitlab.yml
```
```
1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings
1. See [Configure initial settings](omniauth.md#configure-initial-settings) for initial settings
1. Add the provider-specific configuration for your provider, as [described in the gem's README](https://gitlab.com/satorix/omniauth-oauth2-generic#gitlab-config-example)
1. Add the provider-specific configuration for your provider, as [described in the gem's README](https://gitlab.com/satorix/omniauth-oauth2-generic#gitlab-config-example)
-[Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
-[OmniAuth configuration sample when using Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master#omniauth-google-twitter-github-login)
-[Enable or disable Sign In with an OmniAuth provider without disabling import sources](#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources)
## Supported Providers
GitLab supports the following OmniAuth providers.
This is a list of the current supported OmniAuth providers. Before proceeding on
each provider's documentation, make sure to first read this document as it
contains some settings that are common for all providers.
| Provider documentation | OmniAuth provider name |
| Provider documentation | OmniAuth provider name |
created through an OmniAuth provider have their LDAP identity created in GitLab as well.
`allow_single_sign_on` | Enables you to list the providers that automatically create a GitLab account. The provider names are available in the **OmniAuth provider name** column in the [supported providers table](#supported-providers). | The default is `false`. If `false`, users must be created manually, or they can't sign in using OmniAuth.
-`block_auto_created_users` defaults to `true`. If `true`, auto created users will
`auto_link_ldap_user` | If enabled, creates an LDAP identity in GitLab for users that are created through an OmniAuth provider. You can enable this setting if you have the [LDAP (ActiveDirectory)](../administration/auth/ldap/index.md) integration enabled. Requires the `uid` of the user to be the same in both LDAP and the OmniAuth provider. | The default is `false`.
be blocked pending approval by an administrator before they are able to sign in.
`block_auto_created_users` | If enabled, blocks users that are automatically created from signing in until they are approved by an administrator. | The default is `true`. If you set the value to `false`, make sure you only define providers for `allow_single_sign_on` that you can control, like SAML, Shibboleth, Crowd, or Google. Otherwise, any user on the internet can sign in to GitLab without an administrator's approval.
NOTE:
If you set `block_auto_created_users` to `false`, make sure to only
define providers under `allow_single_sign_on` that you are able to control, like
SAML, Shibboleth, Crowd, or Google. Otherwise, set it to `true`, or any user on
the Internet can successfully sign in to your GitLab without
administrative approval.
NOTE:
`auto_link_ldap_user` requires the `uid` of the user to be the same in both LDAP
and the OmniAuth provider.
To change these settings:
To change these settings:
-**For Omnibus package**
-**For Omnibus package**
Open the configuration file:
1.Open the configuration file:
```shell
```shell
sudo editor /etc/gitlab/gitlab.rb
sudo editor /etc/gitlab/gitlab.rb
```
```
and change:
1. Update the following section:
```ruby
```ruby
# CAUTION!
# CAUTION!
...
@@ -111,7 +80,7 @@ To change these settings:
...
@@ -111,7 +80,7 @@ To change these settings:
-**For installations from source**
-**For installations from source**
Open the configuration file:
1.Open the configuration file:
```shell
```shell
cd /home/git/gitlab
cd /home/git/gitlab
...
@@ -119,7 +88,7 @@ To change these settings:
...
@@ -119,7 +88,7 @@ To change these settings:
sudo -u git -H editor config/gitlab.yml
sudo -u git -H editor config/gitlab.yml
```
```
and change the following section:
1. Update the following section:
```yaml
```yaml
## OmniAuth settings
## OmniAuth settings
...
@@ -140,10 +109,10 @@ To change these settings:
...
@@ -140,10 +109,10 @@ To change these settings:
block_auto_created_users: true
block_auto_created_users: true
```
```
Now we can choose one or more of the [Supported Providers](#supported-providers)
After configuring these settings, you can configure
listed above to continue the configuration process.
your chosen [provider](#supported-providers).
## Enable OmniAuth for an Existing User
## Enable OmniAuth for an existing user
Existing users can enable OmniAuth for specific providers after the account is
Existing users can enable OmniAuth for specific providers after the account is
created. For example, if the user originally signed in with LDAP, an OmniAuth
created. For example, if the user originally signed in with LDAP, an OmniAuth
...
@@ -160,7 +129,7 @@ OmniAuth provider for an existing user.
...
@@ -160,7 +129,7 @@ OmniAuth provider for an existing user.
The chosen OmniAuth provider is now active and can be used to sign in to GitLab from then on.
The chosen OmniAuth provider is now active and can be used to sign in to GitLab from then on.
## Automatically Link Existing Users to OmniAuth Users
## Link existing users to OmniAuth users
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36664) in GitLab 13.4.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36664) in GitLab 13.4.
...
@@ -185,7 +154,7 @@ feature for both an **OpenID Connect provider** and a **Twitter OAuth provider**
...
@@ -185,7 +154,7 @@ feature for both an **OpenID Connect provider** and a **Twitter OAuth provider**
auto_link_user:["openid_connect","twitter"]
auto_link_user:["openid_connect","twitter"]
```
```
## Configure OmniAuth Providers as External
## Configure OmniAuth providers as external
You can define which OmniAuth providers you want to be `external`. Users
You can define which OmniAuth providers you want to be `external`. Users
creating accounts, or logging in by using these `external` providers cannot have
creating accounts, or logging in by using these `external` providers cannot have
...
@@ -211,7 +180,7 @@ their accounts to be upgraded to full internal accounts.
...
@@ -211,7 +180,7 @@ their accounts to be upgraded to full internal accounts.
external_providers:['twitter','google_oauth2']
external_providers:['twitter','google_oauth2']
```
```
## Using Custom OmniAuth Providers
## Use a custom OmniAuth provider
NOTE:
NOTE:
The following information only applies for installations from source.
The following information only applies for installations from source.
...
@@ -221,8 +190,6 @@ with a few providers pre-installed, such as LDAP, GitHub, and Twitter. You may a
...
@@ -221,8 +190,6 @@ with a few providers pre-installed, such as LDAP, GitHub, and Twitter. You may a
have to integrate with other authentication solutions. For
have to integrate with other authentication solutions. For
these cases, you can use the OmniAuth provider.
these cases, you can use the OmniAuth provider.
### Steps
These steps are fairly general and you must figure out the exact details
These steps are fairly general and you must figure out the exact details
from the OmniAuth provider's documentation.
from the OmniAuth provider's documentation.
...
@@ -252,7 +219,7 @@ from the OmniAuth provider's documentation.
...
@@ -252,7 +219,7 @@ from the OmniAuth provider's documentation.
sudo service gitlab start
sudo service gitlab start
```
```
### Examples
### Custom OmniAuth provider examples
If you have successfully set up a provider that is not shipped with GitLab itself,
If you have successfully set up a provider that is not shipped with GitLab itself,
please let us know.
please let us know.
...
@@ -260,7 +227,7 @@ please let us know.
...
@@ -260,7 +227,7 @@ please let us know.
While we can't officially support every possible authentication mechanism out there,
While we can't officially support every possible authentication mechanism out there,
we'd like to at least help those with specific needs.
we'd like to at least help those with specific needs.
## Enable or disable Sign In with an OmniAuth provider without disabling import sources
## Enable or disable sign-in with an OmniAuth provider without disabling import sources
Administrators are able to enable or disable **Sign In** by using some OmniAuth providers.
Administrators are able to enable or disable **Sign In** by using some OmniAuth providers.
...
@@ -276,7 +243,7 @@ To enable/disable an OmniAuth provider:
...
@@ -276,7 +243,7 @@ To enable/disable an OmniAuth provider:
@@ -108,7 +108,7 @@ GitLab has several features which can help you manage the number of users:
...
@@ -108,7 +108,7 @@ GitLab has several features which can help you manage the number of users:
- Enable the [**Require administrator approval for new sign ups**](../../user/admin_area/settings/sign_up_restrictions.md#require-administrator-approval-for-new-sign-ups)
- Enable the [**Require administrator approval for new sign ups**](../../user/admin_area/settings/sign_up_restrictions.md#require-administrator-approval-for-new-sign-ups)
option.
option.
- Enable `block_auto_created_users` for new sign-ups via [LDAP](../../administration/auth/ldap/index.md#basic-configuration-settings) or [OmniAuth](../../integration/omniauth.md#initial-omniauth-configuration).
- Enable `block_auto_created_users` for new sign-ups via [LDAP](../../administration/auth/ldap/index.md#basic-configuration-settings) or [OmniAuth](../../integration/omniauth.md#configure-initial-settings).
- Enable the [User cap](../../user/admin_area/settings/sign_up_restrictions.md#user-cap)
- Enable the [User cap](../../user/admin_area/settings/sign_up_restrictions.md#user-cap)
option. **Available in GitLab 13.7 and later**.
option. **Available in GitLab 13.7 and later**.
-[Disable new sign-ups](../../user/admin_area/settings/sign_up_restrictions.md), and instead manage new
-[Disable new sign-ups](../../user/admin_area/settings/sign_up_restrictions.md), and instead manage new