Summary
Currently MediaWiki-extensions-IPReputation queries IPoid data only on account creations. For T354599, we need to also get this data for use in AbuseFilter protected filters. Access to the data should be similar for both uses, so a service can be created that de-duplicates this code.
Background
- MediaWiki-extensions-IPReputation queries IPoid for data about IP addresses being used to be create accounts
- This allows logging or potentially preventing the action if certain conditions are met based on the IPoid data
- In T354599, some of this IPoid data is being provided to AbuseFilter protected filters
- The data obtained by the account creation handler and the to be created AbuseFilter handler will come from the same feed URL, which at this stage cannot be filtered
- Therefore, it makes sense to use a shared cache between the account creation handler and the AbuseFilter handler as both will need the same data
Technical notes
- Should just involve refactoring PreAuthenticationProvider::getIPoidDataFor out to a service, and potentially making the return type a value object to further reduce duplication in handling the array response from the API
Acceptance criteria
- A service is created that obtains IP reputation data from IPoid
- This service is used by PreAuthenticationProvider::testForAccountCreation instead of it's private method that acquires the IPoid data