GitLab
  • 15 May 2024
  • 3 Minutes to read
  • Dark
    Light
  • PDF

GitLab

  • Dark
    Light
  • PDF

Article summary

GitLab is an open-source DevOps lifecycle tool that provides a wiki, issue-tracking, and continuous integration and deployment pipeline features.

Types of Assets Fetched

This adapter fetches the following types of assets:

  • Devices
  • Users

Parameters

  1. Host Name or IP Address (required) - The hostname or IP address of the GitLab server.
  2. API Token (required) - An API Token associated with a user account that has the Required Permissions to fetch assets.
  3. Verify SSL (required, default: False) - Verify the SSL certificate offered by the value supplied in Host Name or IP Address. For more details, see SSL Trust & CA Settings.
    • If enabled, the SSL certificate offered by the value supplied in Host Name or IP Address will be verified against the CA database inside of Axonius. If the SSL certificate can not be validated against the CA database inside of Axonius, the connection will fail with an error.
    • If disabled, the SSL certificate offered by the value supplied in Host Name or IP Address will not be verified against the CA database inside of Axonius.
  4. HTTPS Proxy (optional, default: empty) - A proxy to use when connecting to the value supplied in Host Name or IP Address.
    • If supplied, Axonius will utilize the proxy when connecting to the value supplied in Host Name or IP Address.
    • If not supplied, Axonius will connect directly to the value supplied in Host Name or IP Address.
  5. For details on the common adapter connection parameters and buttons, see Adding a New Adapter Connection.

image.png

Advanced Settings

Note:

Advanced settings can either apply for all connections for this adapter, or you can set different advanced settings and/or different scheduling for a specific connection, refer to ​Advanced Configuration for Adapters

  1. Async chunks in parallel (required, default: 50) - Specify the number of parallel requests all connections for this adapter will send to the GitLab server in parallel at any given point.
  2. Fetch projects as devices (required, default: False) - Select whether to fetch projects as devices from GitLab.
    • If enabled, all connections for this adapter will fetch GitLab projects as devices.
    • If disabled, all connections for this adapter will not fetch GitLab projects.
  3. Fetch Account Settings - Select this option to fetch the GitLab account settings that appear in admin/application_settings/general.
    This setting requires administrator permission and is only relevant for GitLab accounts with Self-managed and GitLab Dedicated offerings. This setting has no effect on accounts with a GitLab.com offering.
NOTE

For details on general advanced settings under the Adapter Configuration tab, see Adapter Advanced Settings.

APIs

Axonius uses the GitLab v4 REST API.

Required Permissions

To create a personal access token to be used in the API Token field with the permissions to fetch user information, do as follows:

  1. Log in to GitLab.
  2. In the upper-right corner, click your avatar and select Settings.
  3. On the User Settings menu, select Access Tokens.
  4. Choose a name and optional expiry date for the token.
  5. Choose the desired scopes:
    • read_user - Allows access to the read-only endpoints under /users. Essentially, any of the GET requests in the Users API are allowed.
    • read_api - Grants read access to the API, including all groups and projects, the container registry, and the package registry.
  6. Click Create personal access token.
  7. Save the personal access token somewhere safe. Once you leave or refresh the page, you won’t be able to access it again.

For more details, see GitLab Docs - Personal access tokens.

Version Matrix

This adapter has only been tested with the versions marked as supported, but may work with other versions. Please contact Axonius Support if you have a version that is not listed and it is not functioning as expected.

VersionSupportedNotes
GitLab 11.0 and higherYes

Was this article helpful?