TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Standard for webhook source IP declaration?

7 pointsby blamarvtover 1 year ago
Is there a standard way to tell customers where your webhooks will be coming from just in case they want to whitelist those IPs?<p>If there isn&#x27;t a standard what is the most common way? Docs? Some random URL with IP CIDRs in JSON?

4 comments

stephenrover 1 year ago
I would encourage you to provide a stable URL where the IPs can be fetched by an automated process, regardless of whether you also provide a &quot;human readable&quot; version. Even just a text file with addresses would be fine.<p>It&#x27;s not that you should expect to be changing them very often but it&#x27;s also extremely unlikely someone using your service is going to manually monitor whatever published list you have - whereas a firewall can be set to fetch your list once a day and will therefor get any changes you need to make, automatically.
TechBro8615over 1 year ago
I think the standard is to publish the IP addresses. I understand why companies request this, so they can open their firewalls to those addresses, but in terms of security the real answer is to use bidirectional mTLS, so that you just need to publish your public certificate rather than (or at least, in addition to) an IP address. Unfortunately, mTLS deployment is fairly complex and isn&#x27;t a great solution for webhooks unless you control the library code on both ends (i.e., you&#x27;re publishing client libraries for receiving the webhooks), or if you make it an opt-in feature for extra security. Otherwise the simple use case of &quot;just set up a receiving HTTP server&quot; becomes much more complicated and adds undue friction for developers implementing code to receive the hooks.
tasnover 1 year ago
This is what we do at Svix: <a href="https:&#x2F;&#x2F;docs.svix.com&#x2F;receiving&#x2F;source-ips">https:&#x2F;&#x2F;docs.svix.com&#x2F;receiving&#x2F;source-ips</a><p>I&#x27;ve seen other companies (e.g. Stripe) also offer it via JSON, but I personally think it&#x27;s not that important to provide it in a machine readable format if you don&#x27;t plan on changing it; which you shouldn&#x27;t as it&#x27;ll break integrations. You should only add new IPs that can only be allocated to new customers.<p>P.S, if you&#x27;d like to start sending webhooks, you should probably check out Svix: <a href="https:&#x2F;&#x2F;www.svix.com">https:&#x2F;&#x2F;www.svix.com</a>
cpachover 1 year ago
This is how Amazon does it: <a href="https:&#x2F;&#x2F;aws.amazon.com&#x2F;blogs&#x2F;aws&#x2F;aws-ip-ranges-json&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;aws.amazon.com&#x2F;blogs&#x2F;aws&#x2F;aws-ip-ranges-json&#x2F;</a>