GitLab
The GitLab integration uses a Personal Access Token (PAT) from a dedicated account to give Trustle insight into over-privileged and unused accounts and to enable just-in-time access management.
Prerequisites
Section titled “Prerequisites”Trustle supports two account types for the integration. Requirements depend on which one you use.
- Group Service Account (GitLab Premium or Ultimate only): requires the Owner role in a top-level group on GitLab.com. For self-hosted GitLab, requires Administrator status, or the Owner role with appropriate permissions. Does not consume a seat license.
- Dedicated User Account (all GitLab tiers): requires a GitLab administrator to create the account. Consumes a seat license.
Use a Group Service Account when available. Otherwise, use a Dedicated User Account.
Configure GitLab
Section titled “Configure GitLab”Step 1: Create a service account
Section titled “Step 1: Create a service account”Choose one of the following options.
Option A: Group service account (recommended, GitLab Premium/Ultimate only)
Section titled “Option A: Group service account (recommended, GitLab Premium/Ultimate only)”-
Go to your top-level group’s service accounts page:
https://gitlab.com/groups/{your-group}/-/settings/service_accounts. -
Click Add service account.
-
Enter a name, for example
trustle-integration. GitLab auto-generates a username likeservice_account_group_{id}_{random}, but you can edit it. -
Click Create service account.
-
Go to Group → Members:
https://gitlab.com/groups/{your-group}/-/group_members. -
Click Invite members.
-
Search for the service account username.
-
Assign the Owner role. This is recommended for full access. The service account inherits access to subgroups and projects.
Option B: Dedicated user account (GitLab Free, or self-hosted without the service account feature)
Section titled “Option B: Dedicated user account (GitLab Free, or self-hosted without the service account feature)”Use this option if you don’t have access to Premium or Ultimate, or if you prefer a manual approach.
-
Have a GitLab administrator create a new user account. Use a username such as
trustle-serviceortrustle-integration, and a service account email such astrustle-service@company.com. -
Configure the account. Set a strong password; it is only needed for initial setup. Mark the account as an External user if it should not access internal projects. For full access to all GitLab users, groups, and projects, grant the Administrator role.
-
Go to each group’s Group → Members → Invite members page.
-
Search for the user account username.
-
Assign the Owner role. This is recommended for full access.
Step 2: Generate a personal access token
Section titled “Step 2: Generate a personal access token”These steps apply to a Group Service Account on GitLab Premium or Ultimate.
-
Go to Group Settings → Service Accounts.
-
Select the service account.
-
Open the Access Tokens tab.
-
Click Add new token.
-
Configure the token:
- Token name: enter a name, for example
Trustle Acme Integration. - Expiration date: set a date according to your security policy. The maximum is 365 days.
- Scopes: select api.
- Token name: enter a name, for example
-
Click Create personal access token.
Connect in Trustle
Section titled “Connect in Trustle”- Go to the Connections page in Trustle from the left menu.
- Under SaaS Applications, find the GitLab logo and click Connect.
- Enter the connection details and the Personal Access Token you created above.
- Click Test Connection.
- After the connection test succeeds, click Save Connection.