User Details
- User Since
- Oct 10 2014, 8:08 AM (582 w, 4 d)
- Availability
- Available
- IRC Nick
- dues, duesen
- LDAP User
- Daniel Kinzler
- MediaWiki User
- DKinzler (WMF) [ Global Accounts ]
Thu, Dec 4
I made a patch for core and for the two relevant maintenance scripts that I could find.
Although the A category within x-trusted-request flag includes WMCS (as well as other wikimedia network traffic), it would indeed be valuable to better differentiate internal processes from true WMCS tools and services.
Wed, Dec 3
Still happening at a low rate, maybe one per day. The ones that involve InfoAction seem to all come from job runner. There are also instances from web requests, from PageTriage's handler for the ArticleViewFooter hook.
Bumping priority to high, since filtering access logs by x-trusted-request is on the critical path for work on api rate limiting.
@Mooeypoo looks like this is related to the API stats you added recently.
Tue, Dec 2
For the record, I asked @taavi about including information about the tool or user in requests coming from WMCS. He said it's not possible because the tools use HTTPS, we can't mess with the encrypted traffic.
Mon, Dec 1
Sun, Nov 30
I 'll also point out that part of the task is about having internal workloads talk to API Gateway (via the mesh or directly, doesn't matter). I 've always been against such a change. The API Gateway should be an entry point from the outside, not to be used internally. That's what the mesh is for (and what Clement is pointing out above for some workloads).
Fri, Nov 28
Wed, Nov 26
Tue, Nov 25
Deployed and tested
As for the disallow fix, might be as simple as $argv[1] === $script?
Mon, Nov 24
Replacing Router and Module with more narrow interfaces in Handler would be nice, yes. Doesn't even have to be new/separate helper classes, the first step can be narrow interfaces implemented by Router and Module.
Deployed and tested. We still only use per-hour limits in production though.
@Alex44019 Indeed, the problem is that we don't know which options have parameters, and which don't. I am preparing a patch that allows options before the script path, but only if they don't need a parameter or they use --foo=bar syntax. I think that would be a useful compromise, though it's a little awkward that --foo bar is supported in some places but not in others.
Do we need a factory for handlers, or for modules? It seems to me like we need an easy way to get a module, because modules haven an OpenApi spec. The handlers only generates bits of that... also, once we have a module, we can easily get a hanlder from it.
Hi @Alex44019, thank you for the analysis! This is indeed unfortunate and not intended. I don't remember if passing the raw argv down to the script implementation is necessary. if so, we should prevent options to be passed before the scipt name. But I supsect that it was simply an oversight on my part - I was probably just assuming that the sscript name is always $argv[1].
Fri, Nov 21
Thu, Nov 20
Wed, Nov 19
Tue, Nov 18
It may be possible to implement this using route metadata: the route sets the metadata, and the ratelimit action uses it. That way, the route can control the policy. A special "no-limit" policy could be used to disable rate limiting entirely (like the "no-limit" class).
Mon, Nov 17
Let's do T410273: api rate limiting: Assign ratelimit class based on IP range instead.
Sat, Nov 15
Fri, Nov 14
Thu, Nov 13
We currently have hourly limits in place that would potentially cause load spikes at the beginning of each hour:
Wed, Nov 12
This is done, @Clement_Goubert deployed API rate limiting for all users of all APIs today (in "shadow mode", so nothing is enforced).
According to turnilo we are getting a couple of hundred requests per day with the xslt= parameter set.
Tue, Nov 11
Nov 7 2025
Envoy's ratelimit service configuration supports catch-all rules, but unfortunately they don't play well with metrics keys. relevant upstream ticket: https://github.com/envoyproxy/ratelimit/pull/996. Looks like someone is working on it.