Skip to content

Managed secret providers

GitLab

Connect GitLab to Alter Vault for secure API access

Use GitLab credentials to make authenticated API calls through Alter Vault without exposing API keys in code.

PropertyValue
Provider IDgitlab
CategoryDeveloper Tools
Credential TypeAPI Key

Log in to GitLab

Log in to GitLab at gitlab.com.

Go to User Settings → Access Tokens

Go to User Settings → Access Tokens at gitlab.com/-/user_settings/personal_access_tokens.

Add a new token

Click ‘Add new token’, set name, expiration, and scopes.

Copy your token

Copy the generated token.

Enter hostname if self-hosted

If using a self-hosted instance, enter the hostname in the GitLab Hostname field.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add GitLab

Go to Managed Secrets > Add Provider > GitLab.

Enter credentials

Paste your Personal Access Token into the credential field. If using a self-hosted instance, also enter your GitLab hostname in the GitLab Hostname field.

Save

Click Save. You’ll receive a grant_id to use with the SDK.

response = await alter_app.request(
HttpMethod.GET,
"https://YOUR_GITLAB_HOST/api/v4/projects",
grant_id="YOUR_GRANT_ID", # Use gitlab.com for cloud or your self-hosted hostname
)