Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

webhook authentication

Henry Medina
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 29, 2019

I want to use webhook w/ Jenkins.  My jenkins server doesn't allow for anonymous access and therefore I need to specify username and password.  I do have an api key that I use to trigger the job via curl command, but I just don't see where I'd specify credentials in our bitbucket server.  It attempts to post the request as anonymous and therefore it fails.  Do we have a mechanism for providing credentials in the webshoot uri?  Embedding them in the url perhaps?  please advise.

 

Thanks,

 

Henry

1 answer

1 vote
swjensen March 13, 2020

I have been scouring the internet for this exact thing as well! I’ve found several things on the Jenkins side that allow you to make the request with inline credentials like:

Http://user:pass@jenkins_url/job/...

 But the native webhooks in Bitbucket seem to strip off the credentials and forces the request to anonymous. 

I’ve submitted a support ticket to Atlassian and will let you know if I hear back. In the mean time I did find this Jenkins plugin: https://plugins.jenkins.io/build-token-root/

which allows you to keep your Jenkins locked down, but exposes a new endpoint which you can use with the remote trigger tokens inside Jenkins. I have tested this with my Bitbucket and Jenkins and it works great, but I’m still a little disappointed Atlassian doesn’t provide a better webhook with basic auth capabilities.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events