Git integration for self-managed GitLab (Beta)
Overview
SnapLogic supports integration with a self-managed GitLab installation deployed on-premises or in the cloud. We provide an app gateway, a secure transparent proxy, to route Git requests through your Groundplex to the GitLab server, providing an additional layer of security. This support in the SnapLogic data plane helps your organization mitigate security risks and protect sensitive information.
To enable use of GitLab for tracking SnapLogic assets, you need the following:
- A subscription for the SnapLogic Git integration
- Administrative permission for the GitLab group
- SnapLogic Org admin permission
Use the following workflow to integrate GitLab with your SnapLogic Org:
App gateway overview
The app gateway establishes secure WebSocket connections between your Groundplex and the SnapLogic Control Plane. The following shows the OAuth2 flow when using GitLab:
App gateway URL
The app gateway URL references your Org, the app name for your GitLab installation, and the app gateway domain. You need this URL to configure the GitLab application and your SnapLogic Org. The URL has the following format:
org-location-environment-appname.controlplanename:port
Substitute the appropriate values to build in the URL:
- org: Org name
- location: Location of your groundplex. Always
sidekick
. - environment: The value in the Environment field in the Snaplex Settings tab.
- appname: The app name for the GitLab server. Example: gitlab
- controlplanename: the value for the control plane your Org connects to:
- Production:
appgateway.prod.snaplogic.io:8095
- UAT:
appgateway.uat.snaplogic.io:8095
- EMEA:
appgateway.emea.snaplogic.io:8095
- Production:
For example, with an Org name of test
, a Groundplex with the environment dev
, the gateway URL would be as follows:
http://test-sidekick-dev-gitlab.appgateway.prod.snaplogic.io:8095
Create application in GitLab
To enable GitLab to track SnapLogic assets, a GitLab administrator must create an application that configures connectivity:
- Log into 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: Redirect URI is the same as the Callback URL that you specify to integrate Git (GitLab) with 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 your SnapLogic Org.
- For Redirect URI, enter:
Configure SnapLogic Org
To finish the configuration, a SnapLogic Org admin must configure the Git integration in Org settings:
- Open the IIP 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.
- 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.appgateway.snaplogic.com
- 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 in the context of GitLab.
- Click Save.
Configure the Groundplex
To configure the Groundplex to connect to the app gateway, an Org admin must do the following:
- In the IIP 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://my_gitlab_servername.example.com
- Key: