Page MenuHomePhabricator

Configure a whitelist of remote addresses for Postmark inbound webhooks
ClosedPublic

Authored by epriestley on Feb 8 2018, 3:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 9:36 AM
Unknown Object (File)
Sat, Sep 21, 6:14 AM
Unknown Object (File)
Fri, Sep 20, 9:59 AM
Unknown Object (File)
Fri, Sep 20, 2:52 AM
Unknown Object (File)
Fri, Sep 20, 12:27 AM
Unknown Object (File)
Fri, Sep 6, 2:12 AM
Unknown Object (File)
Fri, Sep 6, 2:11 AM
Unknown Object (File)
Fri, Sep 6, 2:11 AM
Subscribers
None

Details

Summary

Ref T13053. Postmark support recommends testing requests against a whitelist of known remote addresses to determine request authenticity. Today, the list can be found here:

https://postmarkapp.com/support/article/800-ips-for-firewalls

This is potentially less robust than, e.g., HMAC verification, since they may need to add new datacenters or support IPv6 or something. Users might also have weird network topologies where everything is proxied, and this makes testing/simulating more difficult.

Allow users to configure the list so that they don't need to hack things apart if Postmark adds a new datacenter or remote addresses are unreliable for some other reason, but ship with safe defaults for today.

Test Plan

Tried to make local requests, got kicked out. Added 0.0.0.0/0 to the list, stopped getting kicked out.

I don't have a convenient way to route real Postmark traffic to my development laptop with an authentic remote address so I haven't verified that the published remote address is legitimate, but I'll vet that in production when I go through all the other mailers.

Diff Detail

Repository
rP Phabricator
Branch
mail1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19415
Build 26256: Run Core Tests
Build 26255: arc lint + arc unit

Event Timeline

  • Also mention this whitelist in the "Inbound Mail" documentation.
This revision was not accepted when it landed; it landed in state Needs Review.Feb 8 2018, 4:23 PM
This revision was automatically updated to reflect the committed changes.