runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.82k stars 1.06k forks source link

Add support for bitbucket cloud webhook secrets #3909

Open derektamsen opened 1 year ago

derektamsen commented 1 year ago

Community Note


Describe the user story

Bitbucket cloud recently launched support for webhook secrets. Atlantis should allow adding a webhook secret for bitbucket cloud events. This will add improved security for atlantis to ensure recieved hooks are actually from bitbucket cloud instead of just relying on ip allow lists.

Describe the solution you'd like

The existing Atlantis support for bitbucket server webhook secrets should be extended to bitbucket cloud. This should use the existing configuration options with --bitbucket-webhook-secret. Additionally, once the feature is implemented, the warnings in the documentation regarding bitbucket cloud not supporting webhook secrets should be removed.

Describe the drawbacks of your solution

n/a

Describe alternatives you've considered

n/a

rohitgit-web commented 12 months ago

We are also facing same issue.

almightyfoon commented 8 months ago

The logic for the feature is already in the bitbucketserver client, it should be as simple as porting over the logic and removing the specific check in place to stop that.

Alexx23 commented 6 months ago

BitBucket supports secrets in webhooks from October 2023. BitBucket post: https://bitbucket.org/blog/enhanced-webhook-security

So please remove the error that appears when using the "--bitbucket-webhook-secret" flag. Error: --bitbucket-webhook-secret cannot be specified for BitBucket Cloud because it is not supported by BitBucket