# GitLab

Baton GitLab Connector - Sync users and group members (core identity) and projects / OAuth apps (NHI secrets) from GitLab

## Prerequisites

- A Mesh administrator account with permission to manage connectors.
- `base_url` (optional) — Base URL of the GitLab instance (for example https://gitlab.com/)
- `account_creation_group` (optional) — Default group for new users (required for account creation in Cloud Version)
- `sync_direct_members_only` (optional) — When enabled, only sync direct members of groups and projects
- Credentials for authentication: access_token (stored write-only).

## Authentication

**Method:** Bearer token

Mesh authenticates with a token (personal access token, API token, or bot token).

| Field | Required | Secret | Description |
| --- | --- | --- | --- |
| `access_token` | Yes | Yes (write-only) | GitLab personal access token (stored as secret) |

## Capabilities

<CapabilityMatrix
  capabilities={[
    { name: "Identity & entitlement sync", supported: true },
    { name: "Writeback / remediation", supported: false, notes: "Read-only" },
  ]}
/>

## Data model

_This information is not yet available from the connector schema._

## Setup

1. Gather the required value: `base_url`.
2. Gather the required value: `account_creation_group`.
3. Gather the required value: `sync_direct_members_only`.
4. Create the required credentials in the source system: access_token.
5. In Admin → Connectors, add the connector and enter its configuration.
6. Save and run an initial collection.

## Troubleshooting

_This information is not yet available from the connector schema._
