roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Use a Secret in Docker Hub Webhooks for Caller validation.

Open mghazizadeh opened this issue 4 years ago • 14 comments

Tell us about your request Secure Docker Hub Webhooks

Which service(s) is this request for? Docker Hub

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? We would like to use Webhooks to provide ready to deploy functions for Docker Hub workflow automation for the community, but we need Hub Webhooks to use some kind of security encryption using a secret so that the caller (ie: Docker Hub) can be validated. Open to any of these: Bearer Token HAMC-SH1 HMAC-SH256 Content Type: application/json Here is how GitHub does it: https://developer.github.com/webhooks/creating/?Secret#secret

see also this issue: https://github.com/docker/hub-feedback/issues/1161

Are you currently working around the issue? No. The workaround would open a pretty large security hole in our Webhook implementation.

Additional context Again we want to build publicly available workflow and life cycle automation functions for Docker Hub community using Docker Hub webhooks as the trigger for those automations, but we have to make sure it can be done in a secure manner.

mghazizadeh avatar Mar 31 '20 05:03 mghazizadeh

@mghazizadeh Please follow the issue template for creating new issues here. It helps us to parse through information quicker if all of our issues are formatted in a similar way.

@digvan please use reactions on the original issue comment. This helps us to track community response to various issues without cluttering an issue with lots of +1 comments.

ingshtrom avatar Mar 31 '20 13:03 ingshtrom

@ingshtrom done! modified to use the issue template.

mghazizadeh avatar Mar 31 '20 23:03 mghazizadeh

@mghazizadeh Thanks for submitting this issue - we'll investigate with the team!

Does the community have a preference on the particular security mechanism?

pkennedyr avatar Apr 02 '20 14:04 pkennedyr

@pkennedyr The way GitHub is securing the webhook is a good starting point. You can check this link for more information. https://developer.github.com/webhooks/securing/

Here is also Stripe implementation (which is more secure). https://stripe.com/docs/webhooks/signatures

digvan avatar Apr 02 '20 16:04 digvan

Any update on this?

Stitch07 avatar Jan 14 '21 06:01 Stitch07

+1, Any update on this ? Github/Gitlab/Bitbucket all provide support for webhook secret auth.

adwaitabhandare avatar Jan 19 '21 18:01 adwaitabhandare

Pretty please?

MarcoMatarazzo avatar Jul 21 '21 10:07 MarcoMatarazzo

+1

david-szabo97 avatar Sep 18 '21 05:09 david-szabo97

+1

aguscasaletti avatar Sep 27 '21 15:09 aguscasaletti

Sorry I'm saying this but it's 3 years and still no response on this important feature. What I can say just remove this feature of webhook because it's useless until we are not able to verify a request coming from docker hub or someone just want my server to go down by sending multiple requests

codebysandip avatar Jul 03 '23 09:07 codebysandip

How can such important company forget about such important feature for so many years. When buying DockerHub I thought ci/cd automation will be a piece of cake but no sane techie will allow unauthorized calls to run deploy automation. A workaround through GitHub's workflows after image push is a best option by now but WHY?

Solution ideas:

  1. Host endpoint with current IP ranges, like GitHub and many other do.
  2. Add secret key to webhooks (even an auto-generated one if y'all too busy)

I think @nebuk89 is the right person to actually take on implementing this feature.

Kasperror avatar Oct 18 '23 23:10 Kasperror

I want this feature too :cake: :c. Something basic would be enought for me.

DanielinR avatar Jan 17 '24 15:01 DanielinR

I cannot believe i'm here asking about this feature, we are not talking about some random flask server dude over internet here, we are talking about freaking Dockerhub, and basically not a single mechanism to ensure webhooks come from them, worst not even some IP address to lock security groups on??? Seriously, WTF!!!

krab-skunk avatar May 02 '24 15:05 krab-skunk

no info till now then

atomix-dev avatar Sep 17 '24 02:09 atomix-dev