ilijamt / vault-plugin-secrets-gitlab

Vault Plugin for Gitlab Access Tokens
MIT License
46 stars 7 forks source link

Allow rotation of non-admin config tokens #89

Closed TJM closed 4 months ago

TJM commented 6 months ago

Related to #68

We have the need to use a non-admin service account PAT, but we cannot have it expiring. We would like to use the "rotation API" or at a minimum, the "user" API for creating an access token. We could have an option to use rotation API or maybe we could use it, by default, if the version is over the version where rotation API was added.

cm3brian commented 4 months ago

We have also encountered this issue when trying to rotate tokens in GitLab Cloud, any chance the MR can be progressed? it would be greatly appreciated

ilijamt commented 4 months ago

@cm3brian I've been busy adding tests against real Gitlab instance, as soon as I'm finished with that you'll have that functionality as well. Hopefully this will land in the next couple of weeks.

cm3brian commented 4 months ago

@ilijamt thank you so much for your efforts and moving this along. Both the progress on this and the plugin over all are greatly appreciated from our side!

ilijamt commented 4 months ago

@cm3brian @TJM Would you guys be willing to test it out? Here is the MR #97

ilijamt commented 4 months ago

@cm3brian @TJM I tried with a normal user on gitlab.com, and now you are able to rotate the tokens (also added some tests for this as well). Instead of creating a separate one, I just made it all rotation of the main token use their own endpoint for it. So no need to have two code paths.

ilijamt commented 4 months ago

Released with the new version v0.4.0

TJM commented 4 months ago

Thanks @ilijamt !! Sorry, my gitlab emails were going to the wrong place and I didn't see these.

ilijamt commented 4 months ago

@TJM is it all good now?