When no expiration date is provided and `buffered_token_expiration_limit` FF enabled the token should default to 400 days expiration date
The following discussion from !153876 (merged) should be addressed:
-
@eduardosanz started a discussion: (+4 comments)
Reproduction steps (executed on 2024-12-05):
[5] pry(main)> p Feature.enabled?(:buffered_token_expiration_limit)
true
=> true
[6] pry(main)> q
softhat@irune-gitlab:~/Work/TriLab/gitlab-development-kit/gitlab$ curl --request POST --header "PRIVATE-TOKEN: <token>" --data "name=mytoken" --data "scopes[]=api" "http://gdk.test:3000/api/v4/users/1/personal_access_tokens"
{"id":8,"name":"mytoken","revoked":false,"created_at":"2024-12-05T20:43:36.081Z","description":null,"scopes":["api"],"user_id":1,"last_used_at":null,"active":true,"expires_at":"2025-12-05","token":"...."}
Expected:
The token should have 400 days expiration date.
This bug affects API and UI.
Edited by Eduardo Sanz García