Page MenuHomePhabricator

Expose mailman3 internal REST API inside Wikimedia production network
Open, MediumPublic

Description

The mailman3 service is controlled by a REST API that you can do just about anything with (it's very powerful). It's protected by HTTP auth and that it by default only listens on localhost.

There are various applications of having automation interact with mailman3 to e.g. automatically subscribe/unsubscribe users based on account state or something.

As far as I can tell, the REST API has no further access control besides the singular HTTP auth password - we may want to talk to upstream about that.

In theory we should be able to allow the server to listen on 0.0.0.0 and have ferm block all non-internal connections.

Event Timeline

There are two options in IMO:

  • Expose this to internal network upon request, per node (or wide range)
  • Have all scripts live in lists100x and a central place to handle everything (as a brand-new repository like "mailman workers"), it's more secure and less of a hassle to maintain but also triggering an update directly would be challenge.

It's a trade-off, I'm slightly in favor of the latter given the better security and having a place to have all cases in one place (e.g. when we need to update mailman and some APIs might break, etc.) but I'm biased.

jijiki triaged this task as Medium priority.Apr 2 2021, 11:46 AM

Since we already need envoy in front of the REST API to provide HTTPS, I think we can have it also do some limited access control, or only expose the specific APIs that are needed.