We are using a Bamboo script task to update linked Jira tickets.
We have tech users locally in both systems and use them to do REST calls.
Recently all automation fell down, as it was asking Bamboo tech user to log in to Jira, to be able to see linked issues.
Why that could have happened?
Is there a way to avoid this?
Is it possible to connect users using a code, not UI?
Hello @Artsiom_Tverdakhleb
Let me add some comments on your messages to make sure we are aligned.
We are using a Bamboo script task to update linked Jira tickets.
We have tech users locally in both systems and use them to do REST calls.
I assume you are using username and password for that, right?
Recently all automation fell down, as it was asking Bamboo tech user to log in to Jira, to be able to see linked issues.
What was the error you saw in Bamboo script?
Why that could have happened?
If the requests were without password, it might be the case of a permission change in Jira side for the affected user.
Is there a way to avoid this?
I'll need to make sure I understand the problem correctly first. I would start checking:
Is it possible to connect users using a code, not UI?
When you say connect, are you talking about login? I guess I will need the data shared above to understand better what is happening there.
Hello @Daniel Santos,
Thank you for your reply.
I assume you are using username and password for that, right?
Yes, that's right.
What was the error you saw in Bamboo script?
That was 401, but not actually from Bamboo. You see, the REST API we were calling is:
/result/{projectKey}-{buildKey}-{buildNumber : ([0-9]+)|(latest)}?expand=jiraIssues
So that request was actually returning 401 from Jira. As any other requests to Bamboo were returning the correct information. For example this call:
From the above, I decided to log in into Bamboo with tech user. In the UI on the linked issues page in the Build plan, I saw that it was asking to log in into Jira to see linked issues. So somehow Bamboo or Jira is connecting this both users.
Hope this information would answer your questions.
Regards, Artsiom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now that I reproduced the issue I can tell you what possibly happened.
One of the possible causes for this was the application links recreation.
I suppose that when you (or your team) created the application link the option "[] servers have the same set of users and usernames" was not checked. Considering the scenario where the base of users is possibly different, the Atlassian apps will use a token to identify which user is linked to which user. In other words, when I access with user A, Bamboo will use the user B (that was linked to A) to access Jira. In your case, these users have possibly the same name.
When the application links are created as described above we have to link at least one time the pair of users and this will happen when receiving a message requesting you to log in, then Allow the linking. Once that is done you don't need to redo it unless:
Does that make sense to you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.