GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to rotate a personal access token for a specific group. It is useful for automating the process of refreshing access tokens to maintain secure and uninterrupted access to GitLab group resources. For example, it can be used in workflows that require periodic token rotation to comply with security policies.

Use Case Examples

  1. Automate rotation of a GitLab group personal access token to enhance security.
  2. Integrate token rotation into CI/CD pipelines to ensure tokens are always up to date.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters to be included in the request path, specifically the group ID for which the token is rotated.

Output

JSON

  • id - The ID of the rotated access token.
  • name - The name of the access token.
  • scopes - The scopes or permissions granted to the access token.
  • created_at - Timestamp when the access token was created.
  • expires_at - Expiration date of the access token.
  • token - The new access token string after rotation.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID provided in the path parameters is correct and the authenticated user has permission to rotate tokens for that group.
  • Check that the GitLab API key credential is valid and has sufficient scopes to perform token rotation.
  • Verify the base URL is correct if using a self-hosted GitLab instance.
  • Common error messages may include authentication failures, permission denied, or invalid group ID. Resolving these involves checking credentials, permissions, and input parameters.

Links

Discussion