Page MenuHomePhabricator

Write temporary account logs from AbuseFilter to CheckUser when CheckUser is enabled
Closed, ResolvedPublic

Description

The AbuseFilter follow-up to T373524: Support temporary account-related logs from other extensions in CheckUser.

AbuseFilter will begin logging temporary account IP views in T365743: Log when AbuseFilter user sees IP address associated with temp account via user_unnamed_ip variable trigger in its own log. It would be convenient and nice if all logs with regards to temporary account IPs were centralized in order to make it easier to review. Right now there's no way to use CheckUser's TemporaryAccountLogger to accurately record other IP viewing-related actions. Given that CheckUser is the holder of temporary account IP data, we should log to CheckUser whenever possible.

Acceptance criteria:

  • ProtectedVarsAccessLogger writes to CheckUser's temporary accounts log if CheckUser is enabled

Event Timeline

Change #1069147 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/AbuseFilter@master] Write protected variables access logs to CheckUser if installed

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

Change #1072750 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/CheckUser@master] Update references from AbuseFilter's temp account logs

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

Change #1072750 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Update references from AbuseFilter's temp account logs

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

Change #1069147 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Write protected variables access logs to CheckUser if installed

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

dom_walden subscribed.

When I enable or disable Enable revealing IP addresses for temporary accounts in AbuseFilter in my Special:Preferences, I see an entry in the logging table:

  • with CheckUser disabled, it has the log_type of abusefilter-protected-vars and log_action either change-access-enable or change-access-disable
  • with CheckUser enabled, it has the log_type of checkuser-temporary-account and log_action either af-change-access-enable or af-change-access-disable

In the latter case, I also see it in Special:Log?type=checkuser-temporary-account.

I am not able to access Special:Log?type=abusefilter-protected-vars. I assume it has yet to be implemented. When I try to access it via the API (action=query&format=json&list=logevents&letype=abusefilter-protected-vars) it returns no results. Again, I assume it has not been implemented yet.

Test environment: local docker Abuse Filter – (4124d56) 21:40, 20 September 2024. CheckUser 2.5 (57fb32a) 21:51, 19 September 2024.

I am not able to access Special:Log?type=abusefilter-protected-vars. I assume it has yet to be implemented.

Huh that's weird. It should be there? It would show up if you have any logs written to that type so in the CheckUser disabled scenario, I would have expected it to show up:

image.png (1×1 px, 206 KB)

There was a bug where trying to view the specific subtype ('change-access) was wrong because I hadn't updated the logs under that subtype but I just fixed that in I53f22855e63d9e1339361a5c9ee7886e0f74714a.

kostajh subscribed.

Moving back to "Needs QA" to recheck this part:

I am not able to access Special:Log?type=abusefilter-protected-vars. I assume it has yet to be implemented. When I try to access it via the API (action=query&format=json&list=logevents&letype=abusefilter-protected-vars) it returns no results. Again, I assume it has not been implemented yet.>

When I go to Special:Log?type=abusefilter-protected-vars, I get the message:

You do not have permission to view logs that reveal protected variables, for the following reason:
You are not allowed to execute the action you have requested.

No indication about what sort of permissions/rights I need to enable and I don't know how to find out.

No indication about what sort of permissions/rights I need to enable and I don't know how to find out.

Ah sorry, the rights you need are abusefilter-protected-vars-log and abusefilter-access-protected-vars.

No indication about what sort of permissions/rights I need to enable and I don't know how to find out.

Ah sorry, the rights you need are abusefilter-protected-vars-log and abusefilter-access-protected-vars.

OK, thanks, I can see the page now.