-
Bug
-
Resolution: Fixed
-
Blocker
-
None
Hi Team,
I have configured the HMAC for the Generic Webhook plugin in Jenkins with Bitbucket. However, the plugin does not recognize the header configured for Bitbucket in Jenkins. I have set the header as 'X-Hub-Signature' and configured the secret in Bitbucket, but it is not working, and receiving an error message indicating that the details do not match.
Steps to Reproduce:
- Webhook Setup in Bitbucket:
-
- Go to the repository in Bitbucket.
- Select Repository settings from the left sidebar.
- Click on Webhooks and then click Create webhook.
- Provide the URL where you want to receive the webhook.
- Select the events that will trigger the webhook.
- Click Save.
- HMAC Configuration:
-
- Implement authentication mechanisms to verify the identity of the webhook sender using HMAC signature.
- Define a secret for the webhook in Bitbucket.
- The header X-Hub-Signature is defined and contains the HMAC.
{"jobs":null,"message":"Sender, 10.186.11.20, with headers \{x-request-id=[07ab596e-d990-40b0-baf5-20e7fa7a9889], content-length=[14], x-amzn-trace-id=[Root=1-67a99f51-687588e904c59e6c7c14cc5d], x-forwarded-proto=[https], host=[<Jenkins URL>:443], x-forwarded-port=[443], content-type=[application/json], x-forwarded-for=[10.186.11.20], x-event-key=[diagnostics:ping], accept=[*/*], user-agent=[Atlassian HttpClient 3.0.2 / Bitbucket-8.9.5 (8009005) / Default], via=[1.1 localhost (Apache-HttpClient/4.5.14 (cache))]}
did not pass whitelist.\nDid not find a matching whitelisted host:\n1) Was unable to find header with name \"x-hub-signature\" among {x-request-id=[07ab596e-d990-40b0-baf5-20e7fa7a9889], content-length=[14], x-amzn-trace-id=[Root=1-67a99f51-687588e904c59e6c7c14cc5d], x-forwarded-proto=[https <Jenkins URL>], host=[:443], x-forwarded-port=[443], content-type=[application/json], x-forwarded-for=[10.186.11.20], x-event-key=[diagnostics:ping], accept=[*/*], user-agent=[Atlassian HttpClient 3.0.2 / Bitbucket-8.9.5 (8009005) / Default], via=[1.1 localhost (Apache-HttpClient/4.5.14 (cache))]}\n"}
Regards,
Venkateswar