wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 12 forks source link

Protect route for incoming Bitbucket webhooks #84

Open swissspidy opened 6 years ago

swissspidy commented 6 years ago

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:

Additional context

70

grappler commented 6 years ago

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 commented 6 years ago

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