Skip to content

Authentication required / 403 No valid crumb ... #193

@ololologist

Description

@ololologist
  • Jenkins 2.289.1
  • Bitbucket Push and Pull Request Plugin 2.7.2
  • smee.io

Hello,
we are trying to trigger our SeedJob when a PR is merged to the master branch in our BitBucket repo. Here is what has been done.

Jenkins

Our Jenkins is running inside a private subnet in AWS VPC on Ubuntu Server 20.04.2 LTS, so we have tried to follow these instruction and apply smee.io delivery service.
We have installed smee-client and we use the following line to bind it with Jenkins webhook endpoint
# smee --url https://smee.io/%smee_string% --target http://127.0.0.1:8080/bitbucket-hook/
Forwarding https://smee.io/%smee_string% to http://127.0.0.1:8080/bitbucket-hook/
Connected https://smee.io/%smee_string%

BitBucket

We have created a webhook in the BB repo
BitBucket -> Repository -> Repository Settings -> Webhooks -> Add webhook
Screen Shot 2021-09-01 at 5 44 08 PM

and we can see that the payloads can actually reach smee.io
Screen Shot 2021-09-01 at 5 47 21 PM

Anyway when a BB event payload I can see following errors in the log
Error: cannot POST /bitbucket-hook/ (403)
...
Error 403 No valid crumb was included in the request
full log

After adding -Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true to /etc/default/jenkins and restarting Jenkins the error log shows the following

Error: cannot POST /bitbucket-hook/ (403)
...
Authentication required
full log

Could anyone please kindly guide me to any solution possible?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions