Here a fantastic post of Marjan Sterjev from the Company InterWorks.
JIRA REST API User Impersonation
JIRA is one of the best, if not the best, task management systems on the market. Besides JIRA’s powerful out-of-the-box features, the whole product has rich add-on (plugin) mechanism that can help you customize many JIRA aspects.
JIRA exposes REST API as well that allows building rich ecosystems that support automation of many tasks, creating Issues for example. Sometimes in the systems that act on behalf of many users there is a need to impersonate the user. In other words, third party system will authenticate and access JIRA REST API through service user account, but each Issue that will created shall have arbitrary reporter that matches some other JIRA user.
The impersonation can be achieved by writing JIRA plugin for that. There are ready to use plugins for that purpose on the Atlassian Market. The purpose of this article is demonstrating the power of the JIRA plugin mechanism and how easy we can build the aforementioned impersonation functionality.