How to authenticate server side hooks from Bitbucket server to JIRA to pull a JIRA ID status info?

Nithin Dandu March 2, 2018

We are writing a custom script using shell and curl command in which we enter the URL of JIRA ID using curl command and result displays of status of the ticket in it. We need to validate the status of the JIRA ID as part of every commit message done to BitBucket by a developer. 

Curl command needs a user id and password in order to produce the above results. How do we authenticate this logic from Bitbucekt server if I place this in server side hooks to validate every commit message to see if it has 1) JIRA ID and 2) Status of ticket without passing my user ID.

 

Thanks.

Nithin.D

1 answer

0 votes
Julius Davies [bit-booster.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2018

 

If you write the logic in Java instead of curl you can leverage the existing oauth-aware Bitbucket/JIRA connection logic that Atlassian makes available to plugin developers.  This allows Bitbucket to query JIRA using the user-id of the current user.

My company maintains a paid add-on that covers your exact use-case:  Control Freak for Bitbucket Server.

Here's a screenshot from our Control Freak add-on:

jira-hero.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events