I'm trying to create my own application and add it as Trusted Application in Jira via Application Link functionality.
When I use Generic Application type, then none is displayed under Incoming Authentication and Outgoing Authentication columns.
I've tried to set application type to Confluence and then Jira tries to access /admin/appTrustCertificate file, which of course is missing in my application.
How can I generate this appTrustCertificate file?
How to specify username (without knowing a password) in JIRA REST API request when trusted application incoming authentication is used.
As the webhook is not going to execute on a browser session (am not sure how to correctly word this), I am thinking this might not work. For both trusted/oauth to function, it will be a remote server access initiated while you are in the context of an application open by an user.
In your case, these is a disconnect, as the webhook triggers your script which in turn is accessing JIRA.
I may be completely wrong, but this is what I think.
I saw following code in "Smart Commits" FishEye plugin:
impersonationService.doAsUser(PluginMetadata.PLUGIN_ID, user.getUserName(), new Operation<Void, RuntimeException>()
Then I suppose it's possible by a plugin, but how api doing that just from REST API call without writing a plugin?
Yeah, you are right, you should be able to do it from your web app as well, but I am unable to guide you :(
I am guessing from within the atlassian app it goes via the App Links api which is not available when you are on your on web app - https://developer.atlassian.com/display/APPLINKS/Application+Links
The bigger picture is:
Problem is with item #3, because I don't know how to connect to Jira REST API only knowing username, but not a password.
That's why I thought, that "Trused Application" term is right one to allow "my script" issue API calls on behalf of any user.
Did you see this developer docs on making OAuth calls to JIRA? https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+OAuth+authentication
If you can configure in JIRA this and per user get a OAuth approval, you should be able to push that users changes back into JIRA. Am not sure about the life of the token though.
I'm new to OAuth, mostly used used classes that provided integration, but don't know how the technology works.
So does this work like this:
am I correct?
I saw empty list of active OAuth tokens under Jira user profile, but I didn't see a button to generate one :(
Not really. When the user accesses the site, he will be prompted to authorize, (it's termed OAuth dance), the application receives a token which can be retained to perform actions on behalf of the user. That's the same concept for facebook login also - http://developers.facebook.com/docs/concepts/login/
May be you should try to read the tutorial a couple of times - https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+OAuth+authentication and try to use the client sample code in your web app.
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG