Updating Gitlab integration api key

Klaas Cuvelier January 27, 2025

Hi, we need to upgrade the API key for our Gitlab integration (we're not using one without expiry date). There seems to be no easy way to update the key, so we're wondering if we could recreate the integration (delete, add) without losing the data that we currently already have.

Is the app removal a destructive or non-destructive process?

Thanks.

1 answer

1 accepted

3 votes
Answer accepted
Erik Budtke
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2025

Hey @Klaas Cuvelier !

Apologies for the confusion, our UI admittedly doesn't make this very obvious, but if you click 'Disconnect' in the app config screen, and then (after you've rotated your token) reconnect everything, your data should still be present on any components you've imported/added a repo link to.

Clicking 'Disconnect' will temporarily delete the webhook on the Gitlab side, and so any events generated between Disconnect <-> Connect will be missed, but otherwise this process isn't destructive.

We have an idea in our backlog to make token rotation a more smooth and obvious thing, so I'll link this question to hopefully get it prioritized sooner. 

Hope this answers your question!

Klaas Cuvelier January 29, 2025

Hey Erik, thanks for the information.

We just disconnected our integration to update the token, but we are unable to reconnect now. We receive the message, "We couldn’t find a group access token with the name you entered."

After some investigation, we noticed that the new group token is not on the first page of the GitLab tokens response but on a subsequent page. Is it possible that your implementation only checks the first page, or could there be another explanation?

Like Steffen Opel _Utoolity_ likes this
Erik Budtke
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2025

@Klaas Cuvelier nice find!

You are in fact correct, we are not currently paginating across tokens. Per https://docs.gitlab.com/ee/api/rest/#pagination the default page size is 20, so at the moment that's how many we're fetching from Gitlab.

I'll file a bug and get a fix for this prioritized ASAP. Apologies for any headaches this is causing you! I'll make sure to update you as soon as a fix is deployed.

Erik Budtke
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2025

@Klaas Cuvelier fix is deployed and I was able to verify on my testing site. Let me know if you are running into any more issues and thanks again for the report!

Klaas Cuvelier January 31, 2025

Hi @Erik Budtke I can confirm this worked.

Thanks for the very quick bugfix!

Like Erik Budtke likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events