Page MenuHomePhabricator

Investigate: Should we remove the preference check from AbuseFilter's protected variables implementation?
Closed, ResolvedPublic

Description

In order to access protected variables in AbuseFilter, the user has to not only have the right but also check a preference to enable the feature. This was done as a product requirement to keep it in line with how IPs are treated in CheckUser. With the potential of introducing new protected variables, this preference will have to be generalized to no longer specify IPs (see T380920: Remove the AbuseFilter protected variables preference gate).

However, this requirement is a wmf-specific legal requirement and maybe in that case it doesn't belong in the core codebase of AbuseFilter? We should consider if we need to hardcode this preference check (in the hypothetical where a third party wiki is using AbuseFilter, they might not have the same need to check off a ToS agreement).

Event Timeline

Considering that the preference for CheckUser on WMF wikis includes specific legal text that we have not added for the AbuseFilter preference, it suggests to me that the AbuseFilter preference isn't actually using the correct preference text at the moment.

I see the following options:

  1. Keep the current AbuseFilter preference for viewing any protected variable
  2. Keep the current AbuseFilter preference for viewing just user_unnamed_ip and update the preference text to make it more like the one in CheckUser
  3. (Maybe) Hide the AbuseFilter preference if CheckUser is installed, and rely on the value of that preference?
  4. Get rid of the AbuseFilter preference entirely. If CheckUser is installed then check the value of that preference before accessing user_unnamed_ip?

I think that we will need to update the preference for AbuseFilter to include the details about the policy if we are going to keep the access. I potentially like the idea in #4 because it then mirrors the idea of keeping all temporary account access / log stuff in the same place. However, that would cause additional complexity.

Perhaps what to do here is dependent on what we do in T380919.

I think we should go with 4 as of the outcome of the L3SC task:

I think you're okay to proceed without requiring an NDA/amending the policy to include IP reputation variables.

Given that we'll be implementing these variables as protected variables, it sounds like we don't want to gate protected variables as a whole behind a preference. Let's remove this preference as it affects all protected variables and update T380920: Remove the AbuseFilter protected variables preference gate to reflect that work and create a new task to investigate how we'll treat user_unnamed_ip as a protected-plus variable.

This proposal makes sense to me. Do we need anything else here, or can we close this task?

Do we need anything else here, or can we close this task?

Nope, just wanted to give some time for rebuttal if necessary but it sounds like we're all aligned on direction so let's close this out as the follow-up tasks tracking the work to be done exist elsewhere.