Page MenuHomePhabricator

CheckUser IP reveal: Add a service to AbuseFilter to return the IP address for a given afl_id from abuse_filter_log
Closed, ResolvedPublic

Description

Summary

We need to have a service in AbuseFilter that returns the associated IP address for a given afl_id. This is needed for T400042: CheckUser IP reveal: Support IP reveal on Special:AbuseLog (backend)

Background

  • We want to support CheckUser ip reveal on Special:AbuseLog
    • The rows in Special:AbuseLog use the abuse_filter_log table as it's source which also contains the associated IP used by the user when the log was created
    • CheckUser has a copy of this data, but not in a format that we can easily query; the associated abuse_filter_log ID is not indexed in the cu_private_event table
  • We therefore need to access this IP from the abuse_filter_log table given a afl_id
    • To make this stable, we need a service that can be called from CheckUser to do the lookup.
    • This service could also be re-used for AbuseFilter code
  • This service should not cause any logs to be created because we want to use the CheckUser IP reveal log for this
    • Therefore, the service should be marked such that callers are expected to create the correct log entries for aduiting

Acceptance criteria

  • A service exists in AbuseFilter that allows a caller to get the IP used for a given abuse_filter_log row identified by it's afl_id, which is also marked as stable for use outside the extension

Event Timeline

Change #1171203 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/AbuseFilter@master] Add service to lookup IP address for a given abuse_filter_log row

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

Change #1171269 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/AbuseFilter@master] Add the AbuseFilterLogDetailsLookup service

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

The patch is being merged now and this task can be cirectly closed, since it will be tested as part of the QA for the parent task T388124: CheckUser IP reveal: Support IP reveal on Special:AbuseLog.

Seems I spoke too soon. Has been +2'd now.

Change #1171269 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Add the AbuseFilterLogDetailsLookup service

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

Change #1171203 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Support batch IP lookup in AbuseFilterLogDetailsLookup

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