IP Masking means that we create a temporary account for any user that's editing without being logged in. More details on how temporary account work [[ https://www.mediawiki.org/wiki/Help:Temporary_accounts/How_it_works | here ]], and more details on what to look for when adapting an extension to handle temporary accounts is [[ https://phabricator.wikimedia.org/T326816 | here ]]
Quick searches for relevant code in the WikibaseMediaInfo extension is [[ https://codesearch.wmcloud.org/deployed/?q=-%3EisAnon%7C-%3EisRegistered%7Cmw%5C.user%5C.isAnon%7Cmw%5C.user%5C.getId%7Cmw%5C.user%5C.getRegistration&files=&excludeFiles=&repos=mediawiki%2Fextensions%2FWikibaseMediaInfo | here ]] and [[ https://codesearch.wmcloud.org/deployed/?q=mw%5C.user%5C.getName%7C%5C%24user-%3EgetName%7C%5C%24user-%3EgetRealName&files=&excludeFiles=&repos=mediawiki%2Fextensions%2FWikibaseMediaInfo | here ]]
We'll need to decide whether a temp user should get the constraint checks (probably not?)
To enable temporary accounts in your local dev env, add this to LocalSettings.php
```
$wgAutoCreateTempUser['enabled'] = true;
```
---
ATM when you edit structured data anonymously you do so via wikibase api calls that record your IP address if you're not logged in (to see this in action edit some SD on a file on commons, then look in RecentChanges to see your IP address). What we need to remedy this is some way of create a temporary account from js inside `makeEditable()` in `StatementPanel.js` and `CaptionsPanel.js`. Could be js-native code, or an api endpoint we can call ourselves to create a temp account and get an access token for it
The AHT team is considering options in [[ https://phabricator.wikimedia.org/T336187 | this ticket ]], so putting this one in blocked until we know more