Page MenuHomePhabricator

Create a log entry when the LogHandler is called
Closed, ResolvedPublic2 Estimated Story Points

Description

Motivation

Read epic task T292755: Epic: IP Info access for context.

By doing this task, a log entry should be created any time the popup is accessed (the popup can use either LogHandler or RevisionHandler and T294658: Create a log entry when the RevisionHandler is called will handle RevisionHandler)

AC
Spec
  • When a user views the IP Info popup create a log entry
  • The log entry should capture:
    • Who performed the IP information check
    • Access level of the information viewed (limited or full)
    • Which IP address' information was viewed
    • Indicate that the popup was accessed
    • Timestamp of the check
  • Only one log entry should be created if the same user makes multiple checks against the same IP address over a period of 24 hours

Sample log entries:

User:A viewed limited IP Information popup for 1.1.1.1 at October 22, 11:25 UTC
User:B viewed full IP Information popup for 1.2.3.4 at October 28, 00:04 UTC

Event Timeline

Niharika triaged this task as Medium priority.Oct 29 2021, 5:42 PM
Niharika created this task.
Niharika updated the task description. (Show Details)

Would these log lines continue to show an IP address in a post-IP masking world? Or would they be retroactively updated?

Would these log lines continue to show an IP address in a post-IP masking world? Or would they be retroactively updated?

I think this is where we can leverage MediaWiki's on-wiki logging infrastructure:

Log lines (actions) are formatted by a formatter (handler) โ€“ which formatter formats which log line is governed by $wgLogActionsHandlers. We're going to need to create at least one formatter for the log lines that IPInfo produces so we could bake in the idea that the target IP can be formatted as masked (but do nothing about it for now) with near-zero cost.

Change 736267 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/IPInfo@master] WIP: Add IPInfo log to Special:Log

https://gerrit.wikimedia.org/r/736267

phuedx renamed this task from IP Info: Create a log entry when the IP Info popup is viewed to Create a log entry when the popup is viewed.Nov 2 2021, 3:39 PM
phuedx added a project: Anti-Harassment.
phuedx updated the task description. (Show Details)
phuedx moved this task from Untriaged to Triage/To be Estimated on the Anti-Harassment board.
ARamirez_WMF renamed this task from Create a log entry when the popup is viewed to Create a log entry when the popup is viewed [S].Dec 14 2021, 5:17 PM
ARamirez_WMF renamed this task from Create a log entry when the popup is viewed [S] to Create a log entry when the popup is viewed.Feb 8 2022, 5:00 PM
ARamirez_WMF set the point value for this task to 2.
STran renamed this task from Create a log entry when the popup is viewed to Create a log entry when the LogHandler is called.Feb 10 2022, 2:19 PM
STran updated the task description. (Show Details)

Change 763393 had a related patch set uploaded (by TsepoThoabala; author: TsepoThoabala):

[mediawiki/extensions/IPInfo@master] Create a log entry when the LogHandler is called

https://gerrit.wikimedia.org/r/763393

Change 763393 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Create a log entry when the LogHandler is called

https://gerrit.wikimedia.org/r/763393

Verified LogHandler and RevisionHandler events is recorded in the log table below:

Screen Shot 2022-02-22 at 10.58.00 PM.png (560ร—2 px, 274 KB)

"Who performed the IP information check" is the actor_id field