Configure the Git Integration to use GitLab on-premises (Beta)
Configure the Git integration for self-managed GitLab.
The Git Integration has beta support for a self-managed GitLab installation deployed on-premises or in the cloud. SnapLogic provides an app gateway, a secure transparent proxy, to route Git requests through your Groundplex to the GitLab server, providing an additional layer of security.
To enable use of self-managed GitLab for tracking SnapLogic assets, you need the following:
- A subscription for the SnapLogic Git Integration
- Administrative permission for the GitLab group
- SnapLogic Environment (Org) admin permission
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:
- An empty field makes all groups and repositories that a user has permission to access visible.
- A comma-separated list with no spaces of one or more paths:
- A wildcard includes all repositories in a group or subgroup. For example: My-group/* includes all repos in My-group, while My-group/subgroup1/* includes all repositories in subgroup1.
- Individual repositories qualified with their parent group or subgroup name. For example: the
My-group/SL-repo1 is directly under the group, while
My-group/subgroup1/SL-repo1 is a repo under
subgroup1.
The list of paths can be in any order. If two entries in the list overlap, the most restrictive applies. In the following list only the repositories in subgroup1 are visible:
My-group/*,My-group/subgroup1/*
.
The following examples show how the most restrictive path applies when entries overlap:
- snaplogic1/*,snaplogic1/repositoryA,snaplogic1/subgroup1/* : Only repositoryA and all repositories in subgroup1 are visible.
- snaplogic1/subgroup1/*,snaplogic1/subgroup1/repositoryB,snaplogic1/subgroup1/repositoryC: Only repositoryB and repositoryC are visible.
- snaplogic1/*,snaplogic1/repositoryE,snaplogic1/subgroup1/repositoryF: Only repositoryE and repositoryF are visible.
- snaplogic1/*,snaplogic1/repositoryG,snaplogic1/subgroup1/*,snaplogic1/subgroup1/repositoryH,snaplogic1/subgroup2/*: Only repositoryG, repositoryH, and all repositories in subgroup2 are visible.
Create an application in GitLab
To enable GitLab to track SnapLogic assets, create an application that configures connectivity:
- Log in to GitLab.
- Navigate to your Group.
- Select Settings.
- Click Applications.
- Click Add a new application.
- Enter a name.
- Specify these values:
- For Redirect URI, enter:
https://control-plane-name.snaplogic.com/api/1/rest/asset/app/oauthcallback
Wherecontrol-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 to configure the Git Integration in your SnapLogic environment/org. - Leave the Confidential box checked.
- For Scopes select the following:
- api
- read_api
- read_user
- write_repository
- Click Save application.
- Click the application to view it and copy the secret to use when configuring the SnapLogic environment.
- For Redirect URI, enter:
Configure the SnapLogic environment
To finish the configuration, a SnapLogic Environment admin can configure Git Integration settings in:
- Classic Manager
- Admin Manager
- Open the Classic Manager.
- From the left panel select Settings.
- Scroll down to Git Integration and click Configure Git.
- From the Git Integration Type dropdown list, select GitLab on-premises.
The configuration dialog opens:
- Enter the following values:
- App ID: The Application ID from the GitLab application.
- 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.
- Client Secret: The Secret copied from the GitLab application.
- Gitlab URL: The app gateway URL in the format: org-location-environment-appname.control-plane-name.
- Auth URL: The URL for your GitLab server.
- Http proxy: The HTTP proxy.
- Https proxy: The HTTPS proxy.
- Authorized scopes:
api
read_api
read_user
write_repository
- 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 that you specified in the GitLab application.
- Click Save.
- Open Admin Manager.
- From the left navigation panel under System Configurations select Git Integration.
- From the Git integration type dropdown list, select GitLab on-premises. The configuration page opens:
- Enter the following values:
- App ID: The Application ID from the GitLab application.
- 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.
- Client secret: The secret copied from the GitLab application.
- Gitlab URL: The app gateway URL in the format:
org-location-environment-appname.control-plane-name:port-number.
For example, with an environment named
test
and a Groundplex with an Environment value ofdev
, the gateway URL would be as follows:https://test-sidekick-dev-gitlab.appgateway.prod.snaplogic.io:8095
- Auth URL: The URL for your GitLab server.
- Http proxy: The HTTP proxy.
- Https proxy: The HTTPS proxy.
- Authorized scopes:
api
read_api
read_user
write_repository
- 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 that you specified in the GitLab application.
- Click Save.
Configure the Groundplex
Configure the Groundplex to connect to the app gateway in Classic Manager or Admin Manager.
- Classic Manager
- Admin Manager
From Classic Manager:
- Select the Project associated with the Groundplex.
- Search for the Groundplex.
- Click it to open the Update Snaplex dialog.
- Click the Node Properties tab.
- In the Global Properties section, click
to add the gateway key-value pair:
- Enter the appropriate values for the app gateway:
- Key:
jcc.app.gateway.gitlab
- Value:
https://
org-location-environment-appname.controlplanename:port where:- org: The environment name.
- location: The location of your Groundplex. Always
sidekick
. - environment: The value in the Environment field in your Groundplex Snaplex Settings tab.
- appname: gitlab.
- controlplanename: The control plane that hosts your environment and
the app gateway port number:
- Production:
appgateway.prod.snaplogic.io:8095
- UAT:
appgateway.uat.snaplogic.io:8095
- EMEA:
appgateway.emea.snaplogic.io:8095
- Production:
-
For example, with an environment named
test
and a Groundplex with an Environment value ofdev
, the gateway URL for self-managed GitLab would be as follows:https://test-sidekick-dev-gitlab.appgateway.prod.snaplogic.io:8095
- Key:
From Admin Manager:
- In the left pane, click Snaplexes.
- Click the Groundplex to open the Update Snaplex page.
- Click the Node properties tab.
- In the Global properties section, click + Add new global property to add the gateway key-value pair:
- Enter the appropriate values for the app gateway:
- Key:
jcc.app.gateway.gitlab
- Value:
https://
org-location-environment-appname.controlplanename:port where:- org: The environment (Org) name without hyphens (-). For example:
myenterprise-snap-test
should be passed asmyenterprisesnaptest
. - location: Location of your groundplex. Always
sidekick
. - environment: The value in the Environment field in your Groundplex Snaplex Settings tab.
- appname: gitlab.
- controlplanename: The control plane that hosts your environment and
the app gateway port number:
- Production:
appgateway.prod.snaplogic.io:8095
- UAT:
appgateway.uat.snaplogic.io:8095
- EMEA:
appgateway.emea.snaplogic.io:8095
- Production:
For example, with an environment named
test
and a Groundplex with an Environment value ofdev
, the gateway URL for self-managed GitLab would be as follows:https://test-sidekick-dev-gitlab.appgateway.prod.snaplogic.io:8095
- org: The environment (Org) name without hyphens (-). For example:
- Key: