Last modified: 2014-06-25 07:30:22 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 T68478, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66478 - EventLogging's country column are logging unwanted (sensitive) chunks of cookie
EventLogging's country column are logging unwanted (sensitive) chunks of cookie
Status: RESOLVED FIXED
Product: Analytics
Classification: Unclassified
EventLogging (Other open bugs)
unspecified
All All
: Highest normal
: ---
Assigned To: Nobody - You can work on this!
u=caistleitner@wikimedia.org c=EventL...
:
Depends on: 66649
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-11 14:42 UTC by christian
Modified: 2014-06-25 07:30 UTC (History)
9 users (show)

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


Attachments

Description christian 2014-06-11 14:42:04 UTC
Column for country data in EventLogging tables sometimes not only
contain the country code, but also larger chunks of the clients
cookies. Sometimes even the sessionId.

The columns look for example like [1]

  GeoIP%3D%3A%3A%3A%3Avx; mediaWiki.user.sessionId=<SESSION_ID_REMOVED>; GeoIP=

or

  US%3A<CITY_REMOVED>%3A<LAT_REMOVED>%3A<LON_REMOVED>%3Av4; ve-beta-welcome-dialog=1; centralnotice_bucket=0-4.2; GeoIP=CH

(replaced potentially sensitive data by <..._REMOVED>).

Initial report is at
  https://lists.wikimedia.org/mailman/private/analytics-internal/2014-June/001540.html

At least
  NavigationTiming_7494934
  NavigationTiming_8365252
  MultimediaViewerNetworkPerformance_7917896
tables are affected, likely more tables. I'll run tests against all
tables containing 'country' in their column names.




[1] To see unredacted examples, run for example

  SELECT event_originCountry FROM log.NavigationTiming_8365252 WHERE LENGTH(event_originCountry) > 2 LIMIT 20;

or

  SELECT event_originCountry FROM log.NavigationTiming_8365252 WHERE event_originCountry LIKE '%session%' LIMIT 20;

against dbstore1002.
Comment 1 Gerrit Notification Bot 2014-06-11 14:42:36 UTC
Change 138748 had a related patch set uploaded by QChris:
Avoid encoding issues by fetching GeoIP cookie through jquery.cookie

https://gerrit.wikimedia.org/r/138748
Comment 2 Gerrit Notification Bot 2014-06-11 18:58:40 UTC
Change 138748 merged by Mwalker:
Avoid encoding issues by fetching GeoIP cookie through jquery.cookie

https://gerrit.wikimedia.org/r/138748
Comment 3 Gerrit Notification Bot 2014-06-13 11:26:14 UTC
Change 139353 had a related patch set uploaded by QChris:
Ignore country values that are not two characters long

https://gerrit.wikimedia.org/r/139353
Comment 4 Gerrit Notification Bot 2014-06-13 12:18:31 UTC
Change 139357 had a related patch set uploaded by QChris:
Reset GeoIP cookie upon encountering invalid country code

https://gerrit.wikimedia.org/r/139357
Comment 5 Gerrit Notification Bot 2014-06-13 17:39:57 UTC
Change 139357 merged by jenkins-bot:
Reset GeoIP cookie upon encountering invalid country code

https://gerrit.wikimedia.org/r/139357
Comment 6 Gerrit Notification Bot 2014-06-16 16:18:08 UTC
Change 139353 merged by Nuria:
Ignore country values that are not two characters long

https://gerrit.wikimedia.org/r/139353
Comment 7 Gerrit Notification Bot 2014-06-16 21:21:39 UTC
Change 140023 had a related patch set uploaded by QChris:
Fixup country column names in post_validation_fixups

https://gerrit.wikimedia.org/r/140023
Comment 8 Gerrit Notification Bot 2014-06-16 21:29:43 UTC
Change 140023 merged by jenkins-bot:
Fixup country column names in post_validation_fixups

https://gerrit.wikimedia.org/r/140023
Comment 9 Gerrit Notification Bot 2014-06-17 07:22:00 UTC
Change 140061 had a related patch set uploaded by QChris:
Fix revision check for MultimediaViewerDuration in post validation fixup

https://gerrit.wikimedia.org/r/140061
Comment 10 christian 2014-06-17 07:29:36 UTC
Affected columns (currently) are
  MultimediaViewerDuration_8318615.event_country
  MultimediaViewerDuration_8572641.event_country
  MultimediaViewerNetworkPerformance_7917896_1.event_country
  MultimediaViewerNetworkPerformance_7917896.event_country
  NavigationTiming_7494934.event_originCountry
  NavigationTiming_8365252.event_originCountry

Of those, only MultimediaViewerDuration_8572641.event_country is still
getting affected rows. Once that is solved, I'll start cleaning up the
tables.
Comment 11 Gerrit Notification Bot 2014-06-17 14:25:47 UTC
Change 140061 merged by jenkins-bot:
Fix revision check for MultimediaViewerDuration in post validation fixup

https://gerrit.wikimedia.org/r/140061
Comment 12 christian 2014-06-23 15:44:26 UTC
Since last Wednesday, Ops (RT: 7708) are running the cleanup scripts.

NavigationTiming_7494934 is cleaned up. Thanks Sean!

For the other 5 tables, Ops currently paused the script due to some
unrelated outages on the databases. But the scripts will resume
soonish.
Comment 13 Dan Andreescu 2014-06-23 16:16:54 UTC
I'll mark this resolved from our point of view.  Once Ops finishes running the scripts, we just have to notify people the fix is complete.
Comment 14 christian 2014-06-24 12:38:33 UTC
The tables

  MultimediaViewerDuration_8318615
  MultimediaViewerDuration_8572641
  MultimediaViewerNetworkPerformance_7917896
  NavigationTiming_7494934
  NavigationTiming_8365252

have been cleaned up. Thanks Sean!

  MultimediaViewerNetworkPerformance_7917896_1

is still missing cleanup, but due to analytics thread at

  http://lists.wikimedia.org/pipermail/analytics/2014-June/002233.html

we'll drop the table altogether.
Comment 15 christian 2014-06-25 07:30:22 UTC
Meanwhile

  MultimediaViewerNetworkPerformance_7917896_1

has been dropped (thanks Andrew and Sean) for bug 66649, so all affected
database tables have either been scrubbed clean or dropped.

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


Navigation
Links