Configure GitLab cloud and the Git Integration

Configure GitLab.com and the SnapLogic Git Integration.

To use GitLab cloud (gitlab.com), register the SnapLogic Platform with GitLab and configure the Git Integration feature in your SnapLogic environment. Each registration applies to one control plane (elastic.snaplogic.com, uat.elastic.snaplogic.com or emea.snaplogic.com) and covers all environments on that control plane.

Administrative privileges are required:

  • In GitLab.com, to:
    • Register SnapLogic as an application.
    • Create one or more repositories.
  • In the SnapLogic environment, to configure the Git Integration feature.

Repository visibility

We recommend that you configure the Git Integration to only access repositories dedicated to SnapLogic assets. This improves the performance of authorization and Git operations in the SnapLogic Platform. It also improves usability by reducing the list of repositories that pipeline developers must choose from during checkout.

GitLab doesn't have a way to filter the repositories accessed by third parties. In SnapLogic Git Integration settings, the optional Namespaces field controls which repositories are visible in Designer and Classic Manager and is used as a filter to avoid the whole tree strucuture and show specific repositories, with the following structure:
  • comma-separated list
  • group_name/* means all the repositories right under the root, not in subgroups.
  • group_name/** means the whole tree
  • group_name/subgroup_1/*, group_name/subgroup_1/subgroup_2/* or _name/subgroup_1/subgroup_2/…/subgroup_n/* means all the repositories under the subgroup_1, subgroup_2 or subgroup_n.
  • group_name/subgroup_1/**, group_name/subgroup_1/subgroup_2/**, group_name/subgroup_1/subgroup_2/…/subgroup_n/** means all the repositories under the subgroup_1 , subgroup_2 or subgroup_n and their decendents subgroups. Here, the first case covers all the others.
  • group_name/repositorya, group_name/subgroup_1/repositoryb, group_name/subgroup_1/repositoryc, group_name/subgroup_1/subgroup_2/repositoryd or group_name/subgroup_1/subgroup_2/…/subgroup_n/repositorye means the specific repositories listed: repositorya, repositoryb, repositoryc, repositoryd, and repositorye.
Important: GitLab groups and subgroups act as containers for Git repositories. GitLab supports multiple levels of subgroups. The SnapLogic Git Integration now repositories at any depth within the project hierarchy, instead of just one or two levels. This allows users to browse and select GitLab repositories located at any level within the GitLab hierarchy during the import process. Users can initiate a checkout/import operation for these deep-level repositories, bringing their contents (e.g., pipelines, accounts, assets, projects) into the designated SnapLogic project space.

Create an application in GitLab

To create an application that configures connectivity with the SnapLogic environment:

  1. Log into gitlab.com.
  2. Navigate to your Group.
  3. Select Settings.
  4. Click Applications.
  5. Click Add a new application.
  6. Enter a name.
  7. For Redirect URI, enter: https://control-plane-name.snaplogic.com/api/1/rest/asset/app/oauthcallback
    Where control-plane-name is the control plane you are using. For example,
    • elastic
    • uat
    • emea
    Important: This Redirect URI is the same as the Callback URL that you specify in SnapLogic Git Integration settings.
  8. Leave the Confidential box checked.
  9. For Scopes select the following:
    • api
    • read_api
    • read_user
    • write_repository
  10. Click Save application.
  11. Click the application to view it and copy the secret to use when configuring your SnapLogic environment.

Configure the SnapLogic environment

Configure the Git Integration with Classic Manager or Admin Manager.

To configure the Git Integration in Classic Manager:

  1. From the left panel select Settings.
  2. Scroll down to Git Integration and click Configure Git.
  3. From the Git Integration Type dropdown list, select GitLab cloud. The configuration dialog opens:
    Configure GitLab

  4. Enter the following values, some are pre-populated:
    1. App ID: The Application ID from the GitLab application.
    2. Namespaces: An optional, comma-separated list of repository paths that specifies which repositories are visible to developers in the SnapLogic interface. Refer to Repository visibility for the acceptable syntax.
    3. Client Secret: Paste the Secret copied from the GitLab application.
    4. Gitlab URL: https://gitlab.com
    5. Authorized scopes: api read_api read_user write_repository
    6. Callback URL: The Redirect URI from the GitLab application, https://control-plane-name.snaplogic.com/api/1/rest/asset/app/oauthcallback.
      Where control-plane-name is the control plane you are using. For example,
      • elastic
      • uat
      • emea
      Important: This Callback URL is the same as the Redirect URI in the context of GitLab.
  5. Click Save.

To configure the Git Integration in Admin Manager:

  1. In the left pane, navigate to System Configuration > Git Integration.
  2. From the Git integration type dropdown list, select Gitlab cloud.
    Configure Gitlab

  3. Enter the following values, some are pre-populated:
    1. App ID: The Application ID from the GitLab application.
    2. Namespaces: An optional, comma-separated list of repository paths that specifies which repositories are visible to developers in the SnapLogic interface. Refer to Repository visibility for the acceptable syntax.
    3. Client secret: Paste the Secret copied from the GitLab application.
    4. Gitlab URL: https://gitlab.com
    5. Authorized scopes: api read_api read_user write_repository
    6. Callback URL: The Redirect URI from the GitLab application, https://control-plane-namesnaplogic.com/api/1/rest/asset/app/oauthcallback.
      Where control-plane-name is the control plane you are using. For example,
      • elastic
      • uat
      • emea
      Important: This Callback URL is the same as the Redirect URI in the context of GitLab.
  4. Click Save.

Next, each user in the environment must Authorize SnapLogic to connect to GitLab.