Right now, only our API gateway (and mediawiki when using OAuth) use JWTs for authentication; but our general plan is to switch more api calls to use JWTs, and to use JWTs for mediawiki session cookies.
So we should decode/validate these JWTs in haproxy, and:
- signal to the rest of our filtering stack that we have a cookie we have validated (maybe: set a valid-invalid state)
- Ideally, given the JWT contains a user id, also allow the rest of the filtering stack to access it. We don't need that to make it past the edge, actually the opposite
- For now, we might also want to check for a mw session token instead.
We have some freedom on the "how to signal" this information, of course.