When a user modifies one of our objects in Confluence (our plugin manages requirements), we update the link titles in Jira (implemented as Remote Issue Links). So we have a queue of messages in Confluence, and a job that sends the queue to Jira every 2 minutes.
- Should I send the messages to Jira using an administrative user? (This username could be stored in the configuration)
- Should I send the messages using the username that created the message?
There are drawbacks everywhere, so how did you do?
- If we send all messages as “admin” to Jira, then all edits in Jira are attributed to “admin”. Also, there is always the risk that the OAuth token of this admin expires.
- If we send messages using the name of the user who generated the event, then if we have 200 different users editing Confluence, then we need to perform 1 OAuth request for each of those 200 users (=200 requests). Plus, some may not have a Jira login, and some others may need to perform the OAuth dance, so it’s 200 requests with 150 OAuth dances and so on.
- I obviously don’t want to send messages to Jira using Applink’s
createNonImpersonatingAuthenticatedRequestFactory(), because it’s anonymous in Jira and one simply does not write code that performs modifications without being logged in.