Personal Access Token on service account can't be self rotated
Summary
I create a service account.
For this service account i create a personal access token with api,read_api
permission.
Now i wan't to auto rotate this token
Steps to reproduce
With an admin TOKEN curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "https://xxx.gitlab.com/api/v4/service_accounts" Get the service account ID (360 on my example) curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" --data "name=mytoken" --data "scopes[]=read_registry,api,read_api" "https://xxx.gitlab.com/api/v4/users/360/personal_access_tokens" export the ne GITLAB_SA_TOKEN curl --request POST --header "PRIVATE-TOKEN: $GITLAB_SA_TOKEN" "https://gitlab.ubble.ai/api/v4/personal_access_tokens/self/rotate"
i get a {"message":"401 Unauthorized"}
What is the current bug behavior?
Impossible to self rotate Service account personal access toklen
What is the expected correct behavior?
MY Service account can auto rotate it's token
I use Gitlab 16.8.1