Supported resources
| Resource | Available with GitLab Self-Managed | Available with GitLab.com | Read | Grant and revoke access | Available in Risk Center |
|---|---|---|---|---|---|
| GitLab group repositories | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| GitLab personal repositories | ✔️ | ✔️ | ✔️ | ✔️ | |
| GitLab projects | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
1. Create a GitLab service account for Opal
GitLab.com
Under your top-level group that represents your organization on GitLab.com, create a new user with an Owner role. Refer to GitLab instructions for this step. A new account is preferred because we will be using the personal OAuth access token corresponding to this account.
GitLab Self-Managed
Log into your self-managed GitLab instance as an admin, and go to the Admin Area section by from the Main menu > Admin Area > Users. Create a new user and appoint the new user with the access level Administrator.
2. Create a GitLab OAuth app
Opal requires an Application to be set up on GitLab to handle projects and groups synchronization, as well as user pairing.GitLab.com
Follow the instructions in GitLab to create a new OAuth App in your top-level GitLab group.
/callback/gitlab/ e.g., https://app.opal.dev/callback/gitlab/. On a new line, enter your domain name, followed by /callback/gitlab-connection/, e.g., https://app.opal.dev/callback/gitlab-connection/.
Set the app as Trusted and Confidential. Under Scopes, select api, profile, and email.
After creating your app, record the Application ID and copy the secret. These are used in the Application ID and Application Secret fields in Step 3.
GitLab Self-Managed
Follow the instructions in GitLab to create a new OAuth App in your GitLab Self-Managed instance.
/callback/gitlab/ e.g., https://app.opal.dev/callback/gitlab/. On a new line, enter your domain name, followed by /callback/gitlab-connection/, e.g., https://app.opal.dev/callback/gitlab-connection/.
Set the app as Trusted and Confidential. Under Scopes, select api, profile, and email.
After your app is created, record the Application ID and copy the secret. These are used in the Application ID and Application Secret fields in Step 3.
3. Create an Opal app
Go to the Inventory page and select + App. Then select the GitLab tile.
4. Link GitLab identities to Opal accounts (GitLab.com only)
To enable Opal to manage access to GitLab.com, each user must link their GitLab account to their Opal account. Opal requires this step because GitLab only makes the email address of a GitLab account available via its API if a user has elected to publicly display their email address. Thus, Opal needs another way to match GitLab identities with Opal accounts. For security reasons, users must log in to both Opal and GitLab to link their accounts.The following steps require that the GitLab account you want to integrate has a verified email address corresponding to your Opal email address.
- In the bottom left, click your User > Account Settings.

- Click Connect next to the GitLab integration.

- You will be redirected to a GitLab.com page, which will ask you to log into your GitLab account.

