Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,636
Community Members
 
Community Events
185
Community Groups

Webhook Test not setting X-Hub-Signature

I have a Webhook with a Secret and when I run Test connection the response is 401 and the Request does not include the X-Hub-Signature header. This Webhook was working then started failing and troubleshooting revealed this. If I take one of the failed request and POST it with it's headers (including X-Hub-Signature) it works. It just stopped working from bitbucket. 

2 answers

@Rob_Decker I invested alot of time on this issue and finally fixed it by using the CEL expression interceptors, as following. 

In this Trigger, we are using the overlays to add the "X-Hub-Signature" to the body of the payload, where expression value i.e., 1234567 doesn't matter it can be anything, we are just adding the HMAC to the body so that we will not get an error. 

Note: By default there is no interceptor for the bitbucket CLOUD

apiVersion: triggers.tekton.dev/v1beta1
kind: Trigger
metadata:
name: energy
spec:
serviceAccountName: pipeline
interceptors:
- ref:
name: "cel"
params:
- name: "filter"
value: "header.match('X-Event-Key', 'repo:push')"
- name: "overlays"
value:
- key: X-Hub-Signature
expression: "1234567"
bindings:
- ref: energy
template:
ref: energy

I tried the Test Connection request with GET and it worked outside of bitbucket. The responses from within bitbucket and the outside tool are both from the same server where the request is being made but the bitbucket responses are requesting basic auth with a WWW-Authenticate header.

did you ever get this working? I can't even see where to specify the secret for a webhook for repo on Bitbucket Cloud.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events