expires_at is required by gitlab ~16.3

Open
#111 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
gitlab, go
Domain
api, backend

Research direction

Start with the README example for vault write gitlab/token and trace the implementation of the GitLab project access-token request at POST /projects/1/access_tokens. Confirm how the request handles GitLab's required expires_at field, then reproduce the command against a GitLab 16.3-or-newer instance; done means token creation no longer fails because expires_at is missing.

Written by the indexing model from the issue text.

Description

Hi, I'm testing this plugin which would be very useful for an instance-scoped external CI pipeline. But when I tried the examples in the README this error appears:

vault write gitlab/token id=1 name=ci-token scopes=api,write_repository
Error writing data to gitlab/token: Error making API request.

URL: PUT https://<vault host>/v1/gitlab/token
Code: 400. Errors:

* Failed to create a token - POST https://<gitlab host>/api/v4/projects/1/access_tokens: 400 {error: expires_at is missing}

Apparently Gitlab is changing the policy wrt expires_at, and now it's being required.

https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/4133

Could you please include this in the requests?

Dominant language
Go
Stars
63
Forks
12
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from splunk/vault-plugin-secrets-gitlab

All issues in splunk/vault-plugin-secrets-gitlab

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.