diff --git a/doc/administration/auth/README.md b/doc/administration/auth/README.md
index 69220113940..36af166ba0a 100644
--- a/doc/administration/auth/README.md
+++ b/doc/administration/auth/README.md
@@ -23,13 +23,11 @@ providers:
- [GitHub](../../integration/github.md)
- [GitLab.com](../../integration/gitlab.md)
- [Google OAuth](../../integration/google.md)
-- [Google Workspace SSO](../../integration/google_workspace_saml.md)
- [JWT](jwt.md)
- [Kerberos](../../integration/kerberos.md)
- [LDAP](ldap/index.md): Includes Active Directory, Apple Open Directory, Open LDAP,
and 389 Server.
- [Google Secure LDAP](ldap/google_secure_ldap.md)
-- [Okta](okta.md)
- [Salesforce](../../integration/salesforce.md)
- [SAML](../../integration/saml.md)
- [SAML for GitLab.com groups](../../user/group/saml_sso/index.md) **(PREMIUM SAAS)**
diff --git a/doc/administration/auth/okta.md b/doc/administration/auth/okta.md
index 0f2851890e2..88e9180b103 100644
--- a/doc/administration/auth/okta.md
+++ b/doc/administration/auth/okta.md
@@ -1,176 +1,8 @@
---
-type: reference
-stage: Manage
-group: Access
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+redirect_to: '../../integration/saml.md'
---
-# Okta SSO provider
+This document was moved to [another location](../../integration/saml.md).
-Okta is a [Single Sign-on provider](https://www.okta.com/products/single-sign-on/) that can be used to authenticate
-with GitLab.
-
-The following documentation enables Okta as a SAML provider.
-
-## Configure the Okta application
-
-The following guidance is based on this Okta article, on adding a [SAML Application with an Okta Developer account](https://support.okta.com/help/s/article/Why-can-t-I-add-a-SAML-Application-with-an-Okta-Developer-account?language=en_US):
-
-1. In the Okta admin section, make sure to select Classic UI view in the top left corner. From there, choose to **Add an App**.
-1. When the app screen comes up you see another button to **Create an App** and
- choose SAML 2.0 on the next screen.
-1. Optionally you can add a logo
- (you can choose it from ). You'll have to
- crop and resize it.
-1. Next, you'll need the to fill in the SAML general configuration. Here's an example (showing the required URLs and attribute mapping):
- image.
-
- ![Okta admin panel view](img/okta_admin_panel_v13_9.png)
-
-1. The last part of the configuration is the feedback section where you can
- just say you're a customer and creating an app for internal use.
-1. When you have your app you'll have a few tabs on the top of the app's
- profile. Click on the SAML 2.0 configuration instructions button which should
- look like the following:
-
- ![Okta SAML settings](img/okta_saml_settings.png)
-
-1. On the screen that comes up take note of the
- **Identity Provider Single Sign-On URL** which you'll use for the
- `idp_sso_target_url` on your GitLab configuration file.
-
-1. **Before you leave Okta make sure you add your user and groups if any.**
-
----
-
-Now that the Okta app is configured, it's time to enable it in GitLab.
-
-## Configure GitLab
-
-1. See [Initial OmniAuth Configuration](../../integration/omniauth.md#initial-omniauth-configuration)
- for initial settings.
-
-1. To allow your users to use Okta to sign up without having to manually create
- an account first, don't forget to add the following values to your
- configuration:
-
- **For Omnibus GitLab installations**
-
- Edit `/etc/gitlab/gitlab.rb`:
-
- ```ruby
- gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
- gitlab_rails['omniauth_block_auto_created_users'] = false
- ```
-
- ---
-
- **For installations from source**
-
- Edit `config/gitlab.yml`:
-
- ```yaml
- allow_single_sign_on: ["saml"]
- block_auto_created_users: false
- ```
-
-1. You can also automatically link Okta users with existing GitLab users if
- their email addresses match by adding the following setting:
-
- **For Omnibus GitLab installations**
-
- Edit `/etc/gitlab/gitlab.rb`:
-
- ```ruby
- gitlab_rails['omniauth_auto_link_saml_user'] = true
- ```
-
- ---
-
- **For installations from source**
-
- Edit `config/gitlab.yml`:
-
- ```yaml
- auto_link_saml_user: true
- ```
-
-1. Add the provider configuration.
-
- >**Notes:**
- >
- >- Change the value for `assertion_consumer_service_url` to match the HTTPS endpoint
- > of GitLab (append `users/auth/saml/callback` to the HTTPS URL of your GitLab
- > installation to generate the correct value).
- >
- >- To get the `idp_cert_fingerprint` fingerprint, first download the
- > certificate from the Okta app you registered and then run:
- > `openssl x509 -in okta.cert -noout -fingerprint`. Substitute `okta.cert`
- > with the location of your certificate.
- >
- >- Change the value of `idp_sso_target_url`, with the value of the
- > **Identity Provider Single Sign-On URL** from the step when you
- > configured the Okta app.
- >
- >- Change the value of `issuer` to the value of the **Audience Restriction** from your Okta app configuration. This will identify GitLab
- > to the IdP.
- >
- >- Leave `name_identifier_format` as-is.
-
- **For Omnibus GitLab installations**
-
- ```ruby
- gitlab_rails['omniauth_providers'] = [
- {
- name: 'saml',
- args: {
- assertion_consumer_service_url: 'https://gitlab.example.com/users/auth/saml/callback',
- idp_cert_fingerprint: '43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8',
- idp_sso_target_url: 'https://gitlab.oktapreview.com/app/gitlabdev773716_gitlabsaml_1/exk8odl81tBrjpD4B0h7/sso/saml',
- issuer: 'https://gitlab.example.com',
- name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient'
- },
- label: 'Okta' # optional label for SAML login button, defaults to "Saml"
- }
- ]
- ```
-
- **For installations from source**
-
- ```yaml
- - {
- name: 'saml',
- args: {
- assertion_consumer_service_url: 'https://gitlab.example.com/users/auth/saml/callback',
- idp_cert_fingerprint: '43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8',
- idp_sso_target_url: 'https://gitlab.oktapreview.com/app/gitlabdev773716_gitlabsaml_1/exk8odl81tBrjpD4B0h7/sso/saml',
- issuer: 'https://gitlab.example.com',
- name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient'
- },
- label: 'Okta' # optional label for SAML login button, defaults to "Saml"
- }
- ```
-
-1. [Reconfigure](../restart_gitlab.md#omnibus-gitlab-reconfigure) or [restart](../restart_gitlab.md#installations-from-source) GitLab for Omnibus and installations
- from source respectively for the changes to take effect.
-
-You might want to try this out on an incognito browser window.
-
-## Configuring groups
-
-NOTE:
-Make sure the groups exist and are assigned to the Okta app.
-
-You can take a look of the [SAML documentation](../../integration/saml.md#saml-groups) on configuring groups.
-
-
+
+
diff --git a/doc/administration/troubleshooting/group_saml_scim.md b/doc/administration/troubleshooting/group_saml_scim.md
index 5b5ab414546..0ec9c357f11 100644
--- a/doc/administration/troubleshooting/group_saml_scim.md
+++ b/doc/administration/troubleshooting/group_saml_scim.md
@@ -20,6 +20,7 @@ They may then set up a test configuration of the desired identity provider. We i
This section includes relevant screenshots of the following example configurations of [Group SAML](../../user/group/saml_sso/index.md) and [Group SCIM](../../user/group/saml_sso/scim_setup.md):
- [Azure Active Directory](#azure-active-directory)
+- [Okta](#okta)
- [OneLogin](#onelogin)
WARNING:
@@ -59,6 +60,14 @@ IdP Links and Certificate:
![Okta Links and Certificate](img/Okta-linkscert.png)
+Sign on settings:
+
+![Okta SAML settings](img/okta_saml_settings.png)
+
+Self-managed instance example:
+
+![Okta admin panel view](img/okta_admin_panel_v13_9.png)
+
## OneLogin
Application details:
diff --git a/doc/administration/auth/img/okta_admin_panel_v13_9.png b/doc/administration/troubleshooting/img/okta_admin_panel_v13_9.png
similarity index 100%
rename from doc/administration/auth/img/okta_admin_panel_v13_9.png
rename to doc/administration/troubleshooting/img/okta_admin_panel_v13_9.png
diff --git a/doc/administration/auth/img/okta_saml_settings.png b/doc/administration/troubleshooting/img/okta_saml_settings.png
similarity index 100%
rename from doc/administration/auth/img/okta_saml_settings.png
rename to doc/administration/troubleshooting/img/okta_saml_settings.png
diff --git a/doc/integration/google_workspace_saml.md b/doc/integration/google_workspace_saml.md
index 7b561750b0f..46a39a2e64b 100644
--- a/doc/integration/google_workspace_saml.md
+++ b/doc/integration/google_workspace_saml.md
@@ -1,163 +1,8 @@
---
-type: reference
-stage: Manage
-group: Access
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+redirect_to: 'saml.md'
---
-# Google Workspace SSO provider
+This document was moved to [another location](saml.md).
-Google Workspace (formerly G Suite) is a [Single Sign-on provider](https://support.google.com/a/answer/60224?hl=en) that can be used to authenticate
-with GitLab.
-
-The following documentation enables Google Workspace as a SAML provider for GitLab.
-
-## Configure the Google Workspace SAML app
-
-The following guidance is based on this Google Workspace article, on how to [Set up your own custom SAML application](https://support.google.com/a/answer/6087519?hl=en):
-
-Make sure you have access to a Google Workspace [Super Admin](https://support.google.com/a/answer/2405986#super_admin) account.
- Follow the instructions in the linked Google Workspace article, where you'll need the following information:
-
-| | Typical value | Description |
-|------------------|--------------------------------------------------|----------------------------------------------------------|
-| Name of SAML App | GitLab | Other names OK. |
-| ACS URL | `https:///users/auth/saml/callback` | ACS is short for Assertion Consumer Service. |
-| GITLAB_DOMAIN | `gitlab.example.com` | Set to the domain of your GitLab instance. |
-| Entity ID | `https://gitlab.example.com` | A value unique to your SAML app, you'll set it to the `issuer` in your GitLab configuration. |
-| Name ID format | EMAIL | Required value. Also known as `name_identifier_format` |
-| Name ID | Primary email address | Make sure someone receives content sent to that address |
-| First name | `first_name` | Required value to communicate with GitLab. |
-| Last name | `last_name` | Required value to communicate with GitLab. |
-
-You will also need to setup the following SAML attribute mappings:
-
-| Google Directory attributes | App attributes |
-|-----------------------------------|----------------|
-| Basic information > Email | `email` |
-| Basic Information > First name | `first_name` |
-| Basic Information > Last name | `last_name` |
-
-You may also use some of this information when you [Configure GitLab](#configure-gitlab).
-
-When configuring the Google Workspace SAML app, be sure to record the following information:
-
-| | Value | Description |
-|-------------|--------------|-----------------------------------------------------------------------------------|
-| SSO URL | Depends | Google Identity Provider details. Set to the GitLab `idp_sso_target_url` setting. |
-| Certificate | Downloadable | Run `openssl x509 -in -noout -fingerprint` to generate the SHA1 fingerprint that can be used in the `idp_cert_fingerprint` setting. |
-
-While the Google Workspace Admin provides IDP metadata, Entity ID and SHA-256 fingerprint,
-GitLab does not need that information to connect to the Google Workspace SAML app.
-
----
-
-Now that the Google Workspace SAML app is configured, it's time to enable it in GitLab.
-
-## Configure GitLab
-
-1. See [Initial OmniAuth Configuration](../integration/omniauth.md#initial-omniauth-configuration)
- for initial settings.
-
-1. To allow people to register for GitLab, through their Google accounts, add the following
- values to your configuration:
-
- **For Omnibus GitLab installations**
-
- Edit `/etc/gitlab/gitlab.rb`:
-
- ```ruby
- gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
- gitlab_rails['omniauth_block_auto_created_users'] = false
- ```
-
- ---
-
- **For installations from source**
-
- Edit `config/gitlab.yml`:
-
- ```yaml
- allow_single_sign_on: ["saml"]
- block_auto_created_users: false
- ```
-
-1. If an existing GitLab user has the same email address as a Google Workspace user, the registration
- process automatically links their accounts, if you add the following setting:
- their email addresses match by adding the following setting:
-
- **For Omnibus GitLab installations**
-
- Edit `/etc/gitlab/gitlab.rb`:
-
- ```ruby
- gitlab_rails['omniauth_auto_link_saml_user'] = true
- ```
-
- ---
-
- **For installations from source**
-
- Edit `config/gitlab.yml`:
-
- ```yaml
- auto_link_saml_user: true
- ```
-
-1. Add the provider configuration.
-
-For guidance on how to set up these values, see the [SAML General Setup steps](saml.md#general-setup).
-Pay particular attention to the values for:
-
-- `assertion_consumer_service_url`
-- `idp_cert_fingerprint`
-- `idp_sso_target_url`
-- `issuer`
-- `name_identifier_format`
-
- **For Omnibus GitLab installations**
-
- ```ruby
- gitlab_rails['omniauth_providers'] = [
- {
- name: 'saml',
- args: {
- assertion_consumer_service_url: 'https:///users/auth/saml/callback',
- idp_cert_fingerprint: '00:00:00:00:00:00:0:00:00:00:00:00:00:00:00:00',
- idp_sso_target_url: 'https://accounts.google.com/o/saml2/idp?idpid=00000000',
- issuer: 'https://',
- name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress'
- },
- label: 'Google Workspace' # optional label for SAML log in button, defaults to "Saml"
- }
- ]
- ```
-
- **For installations from source**
-
- ```yaml
- - {
- name: 'saml',
- args: {
- assertion_consumer_service_url: 'https:///users/auth/saml/callback',
- idp_cert_fingerprint: '00:00:00:00:00:00:0:00:00:00:00:00:00:00:00:00',
- idp_sso_target_url: 'https://accounts.google.com/o/saml2/idp?idpid=00000000',
- issuer: 'https://',
- name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress'
- },
- label: 'Google Workspace' # optional label for SAML log in button, defaults to "Saml"
- }
- ```
-
-1. [Reconfigure](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) or [restart](../administration/restart_gitlab.md#installations-from-source) GitLab for Omnibus and installations
- from source respectively for the changes to take effect.
-
-To avoid caching issues, test the result on an incognito or private browser window.
-
-## Troubleshooting
-
-The Google Workspace documentation on [SAML app error messages](https://support.google.com/a/answer/6301076?hl=en) is helpful for debugging if you are seeing an error from Google while signing in.
-Pay particular attention to the following 403 errors:
-
-- `app_not_configured`
-- `app_not_configured_for_user`
+
+
diff --git a/doc/integration/saml.md b/doc/integration/saml.md
index d68cf8e2f34..aa519fd9b4f 100644
--- a/doc/integration/saml.md
+++ b/doc/integration/saml.md
@@ -11,14 +11,14 @@ This page describes instance-wide SAML for self-managed GitLab instances. For SA
You should also reference the [OmniAuth documentation](omniauth.md) for general settings that apply to all OmniAuth providers.
-## Common SAML Terms
+## Glossary of common terms
| Term | Description |
|--------------------------------|-------------|
-| Identity Provider (IdP) | The service which manages your user identities, such as ADFS, Okta, OneLogin, or Ping Identity. |
-| Service Provider (SP) | SAML considers GitLab to be a service provider. |
+| Identity provider (IdP) | The service which manages your user identities, such as Okta or OneLogin. |
+| Service provider (SP) | GitLab can be configured as a SAML 2.0 SP. |
| Assertion | A piece of information about a user's identity, such as their name or role. Also known as claims or attributes. |
-| SSO | Single Sign-On. |
+| Single Sign-On (SSO) | Name of authentication scheme. |
| Assertion consumer service URL | The callback on GitLab where users will be redirected after successfully authenticating with the identity provider. |
| Issuer | How GitLab identifies itself to the identity provider. Also known as a "Relying party trust identifier". |
| Certificate fingerprint | Used to confirm that communications over SAML are secure by checking that the server is signing communications with the correct certificate. Also known as a certificate thumbprint. |
@@ -26,8 +26,8 @@ You should also reference the [OmniAuth documentation](omniauth.md) for general
## General Setup
GitLab can be configured to act as a SAML 2.0 Service Provider (SP). This allows
-GitLab to consume assertions from a SAML 2.0 Identity Provider (IdP) such as
-Microsoft ADFS to authenticate users.
+GitLab to consume assertions from a SAML 2.0 Identity Provider (IdP), such as
+Okta to authenticate users.
First configure SAML 2.0 support in GitLab, then register the GitLab application
in your SAML IdP:
@@ -52,7 +52,7 @@ in your SAML IdP:
```
1. To allow your users to use SAML to sign up without having to manually create
- an account first, don't forget to add the following values to your configuration:
+ an account first, add the following values to your configuration:
For Omnibus package:
@@ -85,7 +85,8 @@ in your SAML IdP:
auto_link_saml_user: true
```
-1. Ensure that the SAML [`NameID`](../user/group/saml_sso/index.md#nameid) and email address are fixed for each user, as described in the section on [Security](#security). Otherwise, your users will be able to sign in as other authorized users.
+1. Ensure that the SAML [`NameID`](../user/group/saml_sso/index.md#nameid) and email address are fixed for each user,
+as described in the section on [Security](#security). Otherwise, your users will be able to sign in as other authorized users.
1. Add the provider configuration:
@@ -102,7 +103,7 @@ in your SAML IdP:
issuer: 'https://gitlab.example.com',
name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'
},
- label: 'Company Login' # optional label for SAML login button, defaults to "Saml"
+ label: 'Provider name' # optional label for SAML login button, defaults to "Saml"
}
]
```
@@ -134,6 +135,7 @@ in your SAML IdP:
be a SHA1 fingerprint; check
[the OmniAuth SAML documentation](https://github.com/omniauth/omniauth-saml)
for more details on these options.
+ See the [notes on configuring your identity provider](#notes-on-configuring-your-identity-provider) for more information.
1. Change the value of `issuer` to a unique name, which will identify the application
to the IdP.
@@ -151,16 +153,57 @@ configuration information to the IdP. To build the metadata URL for GitLab, appe
https://gitlab.example.com/users/auth/saml/metadata
```
-At a minimum the IdP *must* provide a claim containing the user's email address, using
-claim name `email` or `mail`. The email will be used to automatically generate the GitLab
-username. GitLab will also use claims with name `name`, `first_name`, `last_name`
-(see [the OmniAuth SAML gem](https://github.com/omniauth/omniauth-saml/blob/master/lib/omniauth/strategies/saml.rb)
-for supported claims).
+At a minimum the IdP *must* provide a claim containing the user's email address using `email` or `mail`.
+See [the assertions list](#assertions) for other available claims.
On the sign in page there should now be a SAML button below the regular sign in form.
Click the icon to begin the authentication process. If everything goes well the user
will be returned to GitLab and will be signed in.
+### Notes on configuring your identity provider
+
+When configuring a SAML app on the IdP, you need at least:
+
+- Assertion consumer service URL
+- Issuer
+- [`NameID`](../user/group/saml_sso/index.md#nameid)
+- [Email address claim](#assertions)
+
+Your identity provider may require additional configuration, such as the following:
+
+| Field | Value | Notes |
+|-------|-------|-------|
+| SAML profile | Web browser SSO profile | GitLab uses SAML to sign users in through their browser. No requests are made directly to the identity provider. |
+| SAML request binding | HTTP Redirect | GitLab (the service provider) redirects users to your identity provider with a base64 encoded `SAMLRequest` HTTP parameter. |
+| SAML response binding | HTTP POST | Specifies how the SAML token is sent by your identity provider. Includes the `SAMLResponse`, which a user's browser submits back to GitLab. |
+| Sign SAML response | Required | Prevents tampering. |
+| X.509 certificate in response | Required | Signs the response and checks against the provided fingerprint. |
+| Fingerprint algorithm | SHA-1 | GitLab uses a SHA-1 hash of the certificate to sign the SAML Response. |
+| Signature algorithm | SHA-1/SHA-256/SHA-384/SHA-512 | Determines how a response is signed. Also known as the digest method, this can be specified in the SAML response. |
+| Encrypt SAML assertion | Optional | Uses TLS between your identity provider, the user's browser, and GitLab. |
+| Sign SAML assertion | Optional | Validates the integrity of a SAML assertion. When active, signs the whole response. |
+| Check SAML request signature | Optional | Checks the signature on the SAML response. |
+| Default RelayState | Optional | Specifies the URL users should end up on after successfully signing in through SAML at your identity provider. |
+| NameID format | Persistent | See [NameID format details](../user/group/saml_sso/index.md#nameid-format). |
+| Additional URLs | Optional | May include the issuer (or identifier) or the assertion consumer service URL in other fields on some providers. |
+
+For example configurations, see the [notes on specific providers](#providers).
+
+### Assertions
+
+| Field | Supported keys |
+|-----------------|----------------|
+| Email (required)| `email`, `mail` |
+| Username | `username`, `nickname` |
+| Full Name | `name` |
+| First Name | `first_name`, `firstname`, `firstName` |
+| Last Name | `last_name`, `lastname`, `lastName` |
+
+If a username is not specified, the email address is used to generate the GitLab username.
+
+Please refer to [the OmniAuth SAML gem](https://github.com/omniauth/omniauth-saml/blob/master/lib/omniauth/strategies/saml.rb)
+for a full list of supported assertions.
+
## SAML Groups
You can require users to be members of a certain group, or assign users [external](../user/permissions.md#external-users), admin or [auditor](../user/permissions.md#auditor-users) roles based on group membership.
@@ -649,6 +692,81 @@ Group SAML on a self-managed instance is limited when compared to the recommende
- { name: 'group_saml' }
```
+## Providers
+
+GitLab support of SAML means that you can sign in to GitLab with a wide range of identity providers.
+Your identity provider may have additional documentation. Some identity providers include
+documentation on how to use SAML to sign in to GitLab.
+
+Examples:
+
+- [ADFS (Active Directory Federation Services)](https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust)
+- [Auth0](https://auth0.com/docs/protocols/saml-protocol/configure-auth0-as-saml-identity-provider)
+- [PingOne by Ping Identity](https://docs.pingidentity.com/bundle/pingone/page/xsh1564020480660-1.html)
+
+Please note that GitLab provides the following setup notes for guidance only.
+If you have any questions on configuring the SAML app, please contact your provider's support.
+
+### Okta setup notes
+
+The following guidance is based on this Okta article, on adding a [SAML Application with an Okta Developer account](https://support.okta.com/help/s/article/Why-can-t-I-add-a-SAML-Application-with-an-Okta-Developer-account?language=en_US):
+
+1. In the Okta admin section, make sure to select Classic UI view in the top left corner. From there, choose to **Add an App**.
+1. When the app screen comes up you see another button to **Create an App** and
+ choose SAML 2.0 on the next screen.
+1. Optionally, you can add a logo
+ (you can choose it from ). You'll have to
+ crop and resize it.
+1. Next, you'll need the to fill in the SAML general configuration with
+ the assertion consumer service URL as "Single sign-on URL" and
+ the issuer as "Audience URI" along with the [NameID](../user/group/saml_sso/index.md#nameid) and [assertions](#assertions).
+1. The last part of the configuration is the feedback section where you can
+ just say you're a customer and creating an app for internal use.
+1. When you have your app you'll have a few tabs on the top of the app's
+ profile. Click on the SAML 2.0 configuration instructions button.
+1. On the screen that comes up take note of the
+ **Identity Provider Single Sign-On URL** which you'll use for the
+ `idp_sso_target_url` on your GitLab configuration file.
+1. **Before you leave Okta, make sure you add your user and groups if any.**
+
+### Google workspace setup notes
+
+The following guidance is based on this Google Workspace article, on how to [Set up your own custom SAML application](https://support.google.com/a/answer/6087519?hl=en):
+
+Make sure you have access to a Google Workspace [Super Admin](https://support.google.com/a/answer/2405986#super_admin) account.
+ Follow the instructions in the linked Google Workspace article, where you'll need the following information:
+
+| | Typical value | Description |
+|------------------|--------------------------------------------------|----------------------------------------------------------|
+| Name of SAML App | GitLab | Other names OK. |
+| ACS URL | `https:///users/auth/saml/callback` | ACS is short for Assertion Consumer Service. |
+| GITLAB_DOMAIN | `gitlab.example.com` | Set to the domain of your GitLab instance. |
+| Entity ID | `https://gitlab.example.com` | A value unique to your SAML app, you'll set it to the `issuer` in your GitLab configuration. |
+| Name ID format | EMAIL | Required value. Also known as `name_identifier_format` |
+| Name ID | Primary email address | Make sure someone receives content sent to that address |
+| First name | `first_name` | Required value to communicate with GitLab. |
+| Last name | `last_name` | Required value to communicate with GitLab. |
+
+You also need to setup the following SAML attribute mappings:
+
+| Google Directory attributes | App attributes |
+|-----------------------------------|----------------|
+| Basic information > Email | `email` |
+| Basic Information > First name | `first_name` |
+| Basic Information > Last name | `last_name` |
+
+You may also use some of this information when you [configure GitLab](#general-setup).
+
+When configuring the Google Workspace SAML app, be sure to record the following information:
+
+| | Value | Description |
+|-------------|--------------|-----------------------------------------------------------------------------------|
+| SSO URL | Depends | Google Identity Provider details. Set to the GitLab `idp_sso_target_url` setting. |
+| Certificate | Downloadable | Run `openssl x509 -in -noout -fingerprint` to generate the SHA1 fingerprint that can be used in the `idp_cert_fingerprint` setting. |
+
+While the Google Workspace Admin provides IdP metadata, Entity ID and SHA-256 fingerprint,
+GitLab does not need that information to connect to the Google Workspace SAML app.
+
## Troubleshooting
### SAML Response
@@ -735,3 +853,11 @@ The following are the most likely reasons that a user is blocked when signing in
- In the configuration, `gitlab_rails['omniauth_block_auto_created_users'] = true` is set and this is the user's first time signing in.
- There are [`required_groups`](#required-groups) configured, but the user is not a member of one.
+
+### Google workspace troubleshooting tips
+
+The Google Workspace documentation on [SAML app error messages](https://support.google.com/a/answer/6301076?hl=en) is helpful for debugging if you are seeing an error from Google while signing in.
+Pay particular attention to the following 403 errors:
+
+- `app_not_configured`
+- `app_not_configured_for_user`
diff --git a/doc/topics/authentication/index.md b/doc/topics/authentication/index.md
index 1988e3e2890..25640671e78 100644
--- a/doc/topics/authentication/index.md
+++ b/doc/topics/authentication/index.md
@@ -35,7 +35,6 @@ This page gathers all the resources for the topic **Authentication** within GitL
- [SAML OmniAuth Provider](../../integration/saml.md)
- [SAML for GitLab.com Groups](../../user/group/saml_sso/index.md) **(PREMIUM SAAS)**
- [SCIM user provisioning for GitLab.com Groups](../../user/group/saml_sso/scim_setup.md) **(PREMIUM SAAS)**
- - [Okta SSO provider](../../administration/auth/okta.md)
- [Kerberos integration (GitLab EE)](../../integration/kerberos.md) **(STARTER)**
## API
diff --git a/doc/user/group/saml_sso/index.md b/doc/user/group/saml_sso/index.md
index 004efe7b244..6046258ee29 100644
--- a/doc/user/group/saml_sso/index.md
+++ b/doc/user/group/saml_sso/index.md
@@ -13,21 +13,24 @@ This page describes SAML for Groups. For instance-wide SAML on self-managed GitL
SAML on GitLab.com allows users to sign in through their SAML identity provider. If the user is not already a member, the sign-in process automatically adds the user to the appropriate group.
-If you follow our guidance to automate user provisioning using [SCIM](scim_setup.md) or [group-managed accounts](group_managed_accounts.md), you do not need to create such accounts manually.
-
-User synchronization of SAML SSO groups is supported through [SCIM](scim_setup.md). SCIM supports adding and removing users from the GitLab group.
+User synchronization of SAML SSO groups is supported through [SCIM](scim_setup.md). SCIM supports adding and removing users from the GitLab group automatically.
For example, if you remove a user from the SCIM app, SCIM removes that same user from the GitLab group.
SAML SSO is only configurable at the top-level group.
-## Configuring your Identity Provider
+If required, you can find [a glossary of common terms](../../../integration/saml.md#glossary-of-common-terms).
-1. Navigate to the group and select **Settings > SAML SSO**.
-1. Configure your SAML server using the **Assertion consumer service URL**, **Identifier**, and **GitLab single sign-on URL**. Alternatively GitLab provides [metadata XML configuration](#metadata-configuration). See [specific identity provider documentation](#providers) for more details.
+## Configuring your identity provider
+
+1. Navigate to the GitLab group and select **Settings > SAML SSO**.
+1. Configure your SAML identity provider using the **Assertion consumer service URL**, **Identifier**, and **GitLab single sign-on URL**.
+ Alternatively GitLab provides [metadata XML configuration](#metadata-configuration).
+ See [specific identity provider documentation](#providers) for more details.
1. Configure the SAML response to include a NameID that uniquely identifies each user.
1. Configure [required assertions](#assertions) at minimum containing
the user's email address.
-1. While the default is enabled for most SAML providers, please ensure the app is set to have [Service Provider](#glossary) initiated calls in order to link existing GitLab accounts.
+1. While the default is enabled for most SAML providers, please ensure the app is set to have service provider
+ initiated calls in order to link existing GitLab accounts.
1. Once the identity provider is set up, move on to [configuring GitLab](#configuring-gitlab).
![Issuer and callback for configuring SAML identity provider with GitLab.com](img/group_saml_configuration_information.png)
@@ -57,30 +60,25 @@ We recommend setting the NameID format to `Persistent` unless using a field (suc
### Assertions
For users to be created with the right information with the improved [user access and management](#user-access-and-management),
-the following user details need to be passed to GitLab as SAML assertions.
+the user details need to be passed to GitLab as SAML assertions.
-| Field | Supported keys |
-|-----------------|----------------|
-| Email (required)| `email`, `mail` |
-| Username | `username`, `nickname` |
-| Full Name | `name` |
-| First Name | `first_name`, `firstname`, `firstName` |
-| Last Name | `last_name`, `lastname`, `lastName` |
+At a minimum, the user's email address *must* be specified as an assertion named `email` or `mail`.
+See [the assertions list](../../../integration/saml.md#assertions) for other available claims.
### Metadata configuration
-GitLab provides metadata XML that can be used to configure your Identity Provider.
+GitLab provides metadata XML that can be used to configure your identity provider.
1. Navigate to the group and select **Settings > SAML SSO**.
1. Copy the provided **GitLab metadata URL**.
-1. Follow your Identity Provider's documentation and paste the metadata URL when it's requested.
+1. Follow your identity provider's documentation and paste the metadata URL when it's requested.
## Configuring GitLab
After you set up your identity provider to work with GitLab, you must configure GitLab to use it for authentication:
1. Navigate to the group's **Settings > SAML SSO**.
-1. Find the SSO URL from your Identity Provider and enter it the **Identity provider single sign-on URL** field.
+1. Find the SSO URL from your identity provider and enter it the **Identity provider single sign-on URL** field.
1. Find and enter the fingerprint for the SAML token signing certificate in the **Certificate** field.
1. Select the access level to be applied to newly added users in the **Default membership role** field. The default access level is 'Guest'.
1. Select the **Enable SAML authentication for this group** toggle switch.
@@ -89,7 +87,7 @@ After you set up your identity provider to work with GitLab, you must configure
![Group SAML Settings for GitLab.com](img/group_saml_settings_v13_3.png)
NOTE:
-Please note that the certificate [fingerprint algorithm](#additional-providers-and-setup-options) must be in SHA1. When configuring the identity provider, use a secure signature algorithm.
+Please note that the certificate [fingerprint algorithm](../../../integration/saml.md#notes-on-configuring-your-identity-provider) must be in SHA1. When configuring the identity provider, use a secure signature algorithm.
### SSO enforcement
@@ -110,19 +108,20 @@ When SSO enforcement is enabled for a group, users can't share a project in the
## Providers
-NOTE:
-GitLab is unable to provide full support for integrating identity providers that are not listed here.
-
-| Provider | Documentation |
-|----------|---------------|
-| Azure | [Configuring single sign-on to applications](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/view-applications-portal) |
-| Okta | [Setting up a SAML application in Okta](https://developer.okta.com/docs/guides/build-sso-integration/saml2/overview/) |
-| OneLogin | [Use the OneLogin SAML Test Connector](https://onelogin.service-now.com/support?id=kb_article&sys_id=93f95543db109700d5505eea4b96198f) |
+The SAML standard means that a wide range of identity providers will work with GitLab. Your identity provider may have relevant documentation. It may be generic SAML documentation, or specifically targeted for GitLab.
When [configuring your identity provider](#configuring-your-identity-provider), please consider the notes below for specific providers to help avoid common issues and as a guide for terminology used.
+For providers not listed below, you can refer to the [instance SAML notes on configuring an identity provider](../../../integration/saml.md#notes-on-configuring-your-identity-provider)
+for additional guidance on information your identity provider may require.
+
+Please note that GitLab provides the following for guidance only.
+If you have any questions on configuring the SAML app, please contact your provider's support.
+
### Azure setup notes
+Please follow the Azure documentation on [configuring single sign-on to applications](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/view-applications-portal) with the notes below for consideration.
+
For a demo of the Azure SAML setup including SCIM, see [SCIM Provisioning on Azure Using SAML SSO for Groups Demo](https://youtu.be/24-ZxmTeEBU). Please note that the video is outdated in regard to
objectID mapping and the [SCIM documentation should be followed](scim_setup.md#azure-configuration-steps).
@@ -142,6 +141,8 @@ We recommend:
### Okta setup notes
+Please follow the Okta documentation on [setting up a SAML application in Okta](https://developer.okta.com/docs/guides/build-sso-integration/saml2/overview/) with the notes below for consideration.
+
For a demo of the Okta SAML setup including SCIM, see [Demo: Okta Group SAML & SCIM setup](https://youtu.be/0ES9HsZq0AQ).
@@ -165,7 +166,7 @@ OneLogin supports their own [GitLab (SaaS)](https://onelogin.service-now.com/sup
application.
If you decide to use the OneLogin generic [SAML Test Connector (Advanced)](https://onelogin.service-now.com/support?id=kb_article&sys_id=b2c19353dbde7b8024c780c74b9619fb&kb_category=93e869b0db185340d5505eea4b961934),
-we recommend the following settings:
+we recommend the ["Use the OneLogin SAML Test Connector" documentation](https://onelogin.service-now.com/support?id=kb_article&sys_id=93f95543db109700d5505eea4b96198f) with the following settings:
| GitLab Setting | OneLogin Field |
|--------------|----------------|
@@ -178,40 +179,6 @@ we recommend the following settings:
Recommended `NameID` value: `OneLogin ID`.
-### Additional providers and setup options
-
-The SAML standard means that a wide range of identity providers will work with GitLab. Unfortunately we have not verified connections with all SAML providers.
-For more information, see our [discussion on providers](#providers).
-
-Your identity provider may have relevant documentation. It may be generic SAML documentation, or specifically targeted for GitLab. Examples:
-
-- [ADFS (Active Directory Federation Services)](https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust)
-- [Auth0](https://auth0.com/docs/protocols/saml-protocol/configure-auth0-as-saml-identity-provider)
-- [Google Workspace](https://support.google.com/a/answer/6087519?hl=en)
-- [JumpCloud](https://support.jumpcloud.com/support/s/article/single-sign-on-sso-with-gitlab-2019-08-21-10-36-47)
-- [PingOne by Ping Identity](https://docs.pingidentity.com/bundle/pingone/page/xsh1564020480660-1.html)
-
-Your Identity Provider may require additional configuration, such as the following:
-
-| Field | Value | Notes |
-|-------|-------|-------|
-| SAML Profile | Web browser SSO profile | GitLab uses SAML to sign users in via their browser. We don't make requests direct to the Identity Provider. |
-| SAML Request Binding | HTTP Redirect | GitLab (the service provider) redirects users to your Identity Provider with a base64 encoded `SAMLRequest` HTTP parameter. |
-| SAML Response Binding | HTTP POST | Your Identity Provider responds to users with an HTTP form including the `SAMLResponse`, which a user's browser submits back to GitLab. |
-| Sign SAML Response | Yes | We require this to prevent tampering. |
-| X.509 Certificate in response | Yes | This is used to sign the response and checked against the provided fingerprint. |
-| Fingerprint Algorithm | SHA-1 | We need a SHA-1 hash of the certificate used to sign the SAML Response. |
-| Signature Algorithm | SHA-1/SHA-256/SHA-384/SHA-512 | Also known as the Digest Method, this can be specified in the SAML response. It determines how a response is signed. |
-| Encrypt SAML Assertion | No | TLS is used between your Identity Provider, the user's browser, and GitLab. |
-| Sign SAML Assertion | Optional | We don't require Assertions to be signed. We validate their integrity by requiring the whole response to be signed. |
-| Check SAML Request Signature | No | GitLab does not sign SAML requests, but does check the signature on the SAML response. |
-| Default RelayState | Optional | The URL users should end up on after signing in via a button on your Identity Provider. |
-| NameID Format | `Persistent` | See [details above](#nameid-format). |
-| Additional URLs | | You may need to use the `Identifier` or `Assertion consumer service URL` in other fields on some providers. |
-| Single Sign Out URL | | Not supported |
-
-If the information you need isn't listed above you may wish to check our [troubleshooting docs below](#i-need-additional-information-to-configure-my-identity-provider).
-
## User access and management
> [Improved](https://gitlab.com/gitlab-org/gitlab/-/issues/268142) in GitLab 13.7.
@@ -231,9 +198,9 @@ When a user tries to sign in with Group SSO, GitLab attempts to find or create a
To link SAML to your existing GitLab.com account:
1. Sign in to your GitLab.com account.
-1. Locate and visit the **GitLab single sign-on URL** for the group you're signing in to. A group owner can find this on the group's **Settings > SAML SSO** page. If the sign-in URL is configured, users can connect to the GitLab app from the Identity Provider.
+1. Locate and visit the **GitLab single sign-on URL** for the group you're signing in to. A group owner can find this on the group's **Settings > SAML SSO** page. If the sign-in URL is configured, users can connect to the GitLab app from the identity provider.
1. Select **Authorize**.
-1. Enter your credentials on the Identity Provider if prompted.
+1. Enter your credentials on the identity provider if prompted.
1. You are then redirected back to GitLab.com and should now have access to the group. In the future, you can use SAML to sign in to GitLab.com.
On subsequent visits, you should be able to go [sign in to GitLab.com with SAML](#signing-in-to-gitlabcom-with-saml) or by visiting links directly. If the **enforce SSO** option is turned on, you are then redirected to sign in through the identity provider.
@@ -369,18 +336,6 @@ Users who are not members of any mapped SAML groups are removed from the GitLab
You can prevent accidental member removal. For example, if you have a SAML group link for `Owner` level access
in a top-level group, you should also set up a group link for all other members.
-## Glossary
-
-| Term | Description |
-|------|-------------|
-| Identity Provider | The service which manages your user identities such as ADFS, Okta, OneLogin, or Ping Identity. |
-| Service Provider | SAML considers GitLab to be a service provider. |
-| Assertion | A piece of information about a user's identity, such as their name or role. Also known as claims or attributes. |
-| SSO | Single Sign On. |
-| Assertion consumer service URL | The callback on GitLab where users are redirected after successfully authenticating with the identity provider. |
-| Issuer | How GitLab identifies itself to the identity provider. Also known as a "Relying party trust identifier". |
-| Certificate fingerprint | Used to confirm that communications over SAML are secure by checking that the server is signing communications with the correct certificate. Also known as a certificate thumbprint. |
-
## Passwords for users created via SAML SSO for Groups
The [Generated passwords for users created through integrated authentication](../../../security/passwords_for_integrated_authentication_methods.md) guide provides an overview of how GitLab generates and sets passwords for users created via SAML SSO for Groups.
@@ -412,7 +367,7 @@ In troubleshooting the Group SAML setup, any authenticated user can use the API
Similarly, group members of a role with the appropriate permissions can make use of the [members API](../../../api/members.md) to view group SAML identity information for members of the group.
-This can then be compared to the [NameID](#nameid) being sent by the Identity Provider by decoding the message with a [SAML debugging tool](#saml-debugging-tools). We require that these match in order to identify users.
+This can then be compared to the [NameID](#nameid) being sent by the identity provider by decoding the message with a [SAML debugging tool](#saml-debugging-tools). We require that these match in order to identify users.
### Users receive a 404
@@ -432,7 +387,7 @@ Here are possible causes and solutions:
| Cause | Solution |
|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| You've tried to link multiple SAML identities to the same user, for a given Identity Provider. | Change the identity that you sign in with. To do so, [unlink the previous SAML identity](#unlinking-accounts) from this GitLab account before attempting to sign in again. |
+| You've tried to link multiple SAML identities to the same user, for a given identity provider. | Change the identity that you sign in with. To do so, [unlink the previous SAML identity](#unlinking-accounts) from this GitLab account before attempting to sign in again. |
### Message: "SAML authentication failed: Email has already been taken"
@@ -442,7 +397,7 @@ Here are possible causes and solutions:
### Message: "SAML authentication failed: Extern UID has already been taken, User has already been taken"
-Getting both of these errors at the same time suggests the NameID capitalization provided by the Identity Provider didn't exactly match the previous value for that user.
+Getting both of these errors at the same time suggests the NameID capitalization provided by the identity provider didn't exactly match the previous value for that user.
This can be prevented by configuring the [NameID](#nameid) to return a consistent value. Fixing this for an individual user involves [unlinking SAML in the GitLab account](#unlinking-accounts), although this will cause group membership and to-dos to be lost.
@@ -452,8 +407,8 @@ Ensure that the user who is trying to link their GitLab account has been added a
Alternatively, the SAML response may be missing the `InResponseTo` attribute in the
`samlp:Response` tag, which is [expected by the SAML gem](https://github.com/onelogin/ruby-saml/blob/9f710c5028b069bfab4b9e2b66891e0549765af5/lib/onelogin/ruby-saml/response.rb#L307-L316).
-The [Identity Provider](#glossary) administrator should ensure that the login is
-initiated by the Service Provider (typically GitLab) and not the Identity Provider.
+The identity provider administrator should ensure that the login is
+initiated by the service provider and not the identity provider.
### Stuck in a login "loop"
@@ -475,7 +430,7 @@ Users will need to [unlink the current SAML identity](#unlinking-accounts) and [
Many SAML terms can vary between providers. It is possible that the information you are looking for is listed under another name.
-For more information, start with your Identity Provider's documentation. Look for their options and examples to see how they configure SAML. This can provide hints on what you'll need to configure GitLab to work with these providers.
+For more information, start with your identity provider's documentation. Look for their options and examples to see how they configure SAML. This can provide hints on what you'll need to configure GitLab to work with these providers.
It can also help to look at our [more detailed docs for self-managed GitLab](../../../integration/saml.md).
SAML configuration for GitLab.com is mostly the same as for self-managed instances.