-
-
Notifications
You must be signed in to change notification settings - Fork 7
Plugin crashes on tokens that lack expiration #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What version of Gitlab are you using? AFAIK personal access tokens always have to have an expiry date. |
This happened because it expected the time field for expires to be set, and it wasn't. So the code panicked. Can you check and let me know what version of Gitlab are you running? Because I haven't been able to replicate this on 16 and 17. |
This is with:
Broken:
Working:
|
Can you show me the output of the broken call, without the pat token?
and
Because with this token I get the following, and I don't get a crash ❯ vault write gitlab/config/default base_url=https://my-gitlab-instance token=glpat-...... auto_rotate_token=false auto_rotate_before=48h type=self-managed
❯ vault read gitlab/config/default
Key Value
--- -----
auto_rotate_before 48h0m0s
auto_rotate_token false
base_url https://my-gitlab-instance
gitlab_is_enterprise true
gitlab_revision 8809f9af4e0
gitlab_version 17.10.4-ee
name default
scopes api
token_created_at 2025-04-16T06:31:15Z
token_expires_at 2026-04-16T00:00:00Z
token_id 94
token_sha1_hash 6d53f6b1d22075c7445e67f0ee4f3129c6e5e00a
type self-managed |
Here's the output: {
"id": 536270,
"name": "vault_engine",
"revoked": false,
"created_at": "2025-04-16T14:17:35.316Z",
"description": null,
"scopes": [
"api"
],
"user_id": 18998,
"last_used_at": null,
"active": true,
"expires_at": null,
"token": "foobar"
} |
Yeah, that's the problem, What do you get on You have most likely found a GitLab bug, because it shouldn't be possible to create a token, especially PAT ones, without expiry now. Can you check what is the reported GitLab version in the admin area? |
With no way to test this, can you check and let me know if this works #179 |
When configuring version 0.8.0 of the plugin we see the following crash when configuring the engine with a personal access token that doesn't expire:
Version 0.4.1 provides clearer error output:
The text was updated successfully, but these errors were encountered: