GitLab API

GitlabTool

Actions1000

Overview

This node operation allows rotating the personal access token for a specific group in GitLab via the GitLab API. It is useful for automating the renewal of access tokens to maintain security without manual intervention. For example, a user can schedule this node to rotate tokens periodically for a group to ensure tokens are up-to-date and reduce the risk of token compromise.

Use Case Examples

  1. Automate token rotation for a GitLab group to enhance security.
  2. Integrate token rotation into CI/CD pipelines to maintain continuous access without manual updates.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or when authentication is handled externally.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to be included in the request path, specifically the group ID for which the access token will be rotated.

Output

JSON

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

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the group ID provided in the path parameters is valid and the authenticated user has permission to rotate tokens for that group.
  • If authentication is skipped, the request may fail due to lack of authorization.
  • Verify the base URL is correct and accessible.
  • Common error messages include 401 Unauthorized (check API token), 404 Not Found (invalid group ID), and 403 Forbidden (insufficient permissions).

Links

Discussion