Last modified: 2013-10-21 15:05:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56783, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54783 - Respect X-Forwarded-For only from trustworthy sources
Respect X-Forwarded-For only from trustworthy sources
Status: NEW
Product: Analytics
Classification: Unclassified
Refinery (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-30 12:05 UTC by christian
Modified: 2013-10-21 15:05 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description christian 2013-09-30 12:05:41 UTC
We unconditionally respect the X-Forwarded-For header that gets fed into
kraken's machineries. Regardless of whether the client IP is a trusted one,
or it is not a trusted one. This distorts our reports/graphs.

Instead, we should only respect the X-Forwarded-For header for the client IPs
in $wgSquidServersNoPurge in wmf-config/squid.php of operations/mediawiki-config.
Comment 1 Diederik van Liere 2013-09-30 12:16:24 UTC
Prioritization and scheduling of this bug is tracked on Mingle card https://mingle.corp.wikimedia.org/projects/analytics/cards/1191
Comment 2 christian 2013-10-21 13:33:16 UTC
Although Ops only seem to trust $wgSquidServersNoPurge in
wmf-config/squid.php of operations/mediawiki-config (private Email with
Faidon, and afterwards analytics-internal), the Wikipedia Zero team also
seem to trust the X-Forwarded-For header also from Opera proxies (private
emails that lead up to:

https://raw.github.com/wikimedia/metrics/5fb67552555c32e4cd4b08b6c4d4ec264b07351f/pageviews/zero/pageview_zero.png

).
Comment 3 Yuri Astrakhan 2013-10-21 14:35:09 UTC
We currently trust XFF from all SSH and OPERA IPs listed at http://meta.wikimedia.org/wiki/Zero:-OPERA

SSH is not yet handled by the Zero since all partners use DPI for whitelisting, effectively ignoring HTTPS traffic
Comment 4 christian 2013-10-21 14:58:28 UTC
(In reply to comment #3)
> We currently trust XFF from all SSH [...]

I do not know SSH in this context. What does it stand for?
Comment 5 Faidon Liambotis 2013-10-21 15:02:53 UTC
(I don't understand what SSH means here either)

squid.php is what MediaWiki considers as trusted as an XFF source (e.g. what would appear on IP edits). Ops doesn't have such whitelists -- apart from the very unusual & special Zero detection, we don't care about the values of XFF, so far.

I think Analytics should move into a direction that makes sense for you from an analytics perspective (e.g. you even be able to tell us what other large proxies exist out there, purely by analyzing the request stream :) and we might find a way to converge such info in the future.
Comment 6 Max Semenik 2013-10-21 15:05:47 UTC
Note that MediaWiki also trusts some other proxies, see https://www.mediawiki.org/wiki/Extension:TrustedXFF

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links