Skip to content

GitLab REST API for resource access tokens doesn't respect application setting to turn of required expiry date

Discovered in terraform-provider-gitlab!2720 (comment 2800140161)


The resource_access_tokens REST API (for Project- and Group Access Tokens) doesn't respect the require_personal_access_token_expiry application setting.

The Personal Access Tokens API does that correct.

Implementation Plan

Have a look at the Personal Access Tokens API here. It implements the expires_at parameter as optional. The create service then checks for the application setting here. We need to do the same for Project- and Group Access Tokens.

Edited by 🤖 GitLab Bot 🤖