Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect route for incoming Bitbucket webhooks #84

Open
swissspidy opened this issue Oct 31, 2018 · 2 comments
Open

Protect route for incoming Bitbucket webhooks #84

swissspidy opened this issue Oct 31, 2018 · 2 comments
Labels
[Component] API Concerns REST API Endpoints, e.g. for incoming webhooks [Type] Question Support requests and other types of questions

Comments

@swissspidy
Copy link
Collaborator

Issue Overview

In #70 we discussed how we can better protected the incoming webhook route for Bitbucket requests.

Bitbucket.org doesn't support secrets, so it's not really possible to verify these requests.

Right now we simply let all requests pass, which is not ideal.

What we could do:

  • Check request headers to verify that the requests come from Bitbucket
    Error prone, doesn't help that much.
  • Disallow these incoming webhooks by default and have users filter the responses to make them work.
    Poor UX because they don't work out of the box.

Additional context
#70

@swissspidy swissspidy added [Type] Question Support requests and other types of questions [Component] API Concerns REST API Endpoints, e.g. for incoming webhooks labels Oct 31, 2018
@grappler
Copy link
Contributor

grappler commented Nov 8, 2018

Could we adapt API Endpoint to include the secret in the URL?

So instead of https://<url-to-your-glotpress-site>.com/wp-json/traduttore/v1/incoming-webhook have https://<url-to-your-glotpress-site>.com/wp-json/traduttore/v1/incoming-webhook/secret

@swissspidy
Copy link
Collaborator Author

Hmm... Something like that is certainly doable, but I don't particularly like it. Especially since I would not want to support this for non-Bitbucket-requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] API Concerns REST API Endpoints, e.g. for incoming webhooks [Type] Question Support requests and other types of questions
Projects
None yet
Development

No branches or pull requests

2 participants