Implement event logging (like T146230) but we should be able to differentiate IP cookie blocks from username cookie blocks.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T52039 Proposed changes to default settings (DefaultSettings.php) (tracking) | |||
Resolved | dmaza | T191922 Enable $wgCookieSetOnIpBlock by default after the IP cookie block feature is fully tested and released | |||
Declined | None | T233597 Refactor ApiMain to use OutputPage::sendCacheControl | |||
Resolved | dbarratt | T196575 Add block cookie for browser-based API edits (including VisualEditor & MobileFrontend) | |||
Resolved | • TBolliger | T120734 Epic ⚡️ Improve MediaWiki's blocking tools | |||
Resolved | dmaza | T152462 Add cookie when blocking anonymous users | |||
Resolved | dmaza | T193768 Remove debug logic when a Cookie is set for IP Blocks | |||
Invalid | dmaza | T191542 Implement event logging for IP cookie blocks to make sure it's working reasonably |
Event Timeline
Change 427938 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/WikimediaEvents@master] [WIP] Implement event logging for IP cookie blocks autoblocks
@Niharika, @kaldari, @TBolliger, @dbarratt
I've been going back and forth on this to determine how best can we measure the new Cookie blocking for IP users. The only measurement I can think that could be useful is the resulting autoblocks from the IP cookie block.
https://gerrit.wikimedia.org/r/427938
This is the schema:
{ "description": "Logs autoblocks when a logged-out user is denied editing due to presence of cookie referencing an IP/Range Block", "properties": { "ip": { "description": "IP address blocked", "type": "string", "required": true }, "block_id": { "description": "Resulting autoblock (Block ID) created", "type": "integer", "required": true } } }
Let me know what you think.
@dmaza We do have some eventlogging in place from when we did cookie blocks. See -
https://gerrit.wikimedia.org/r/#/c/320405/6/includes/user/User.php and https://gerrit.wikimedia.org/r/#/c/320239/
Can we modify the CookieBlock schema to accommodate for autoblocks?
Can we modify the CookieBlock schema to accommodate for autoblocks?
We can, I thought on creating a new one just to make it more relevant through the name and because the WIP patch is tracking something different. But we could re-use that one.
https://gerrit.wikimedia.org/r/#/c/320405/6/includes/user/User.php and https://gerrit.wikimedia.org/r/#/c/320239/
I looked at those patches. I feel that they make sense for what you were trying to accomplish, I'm not so sure that's what we want to do here.
That is the reason I'm asking. Maybe we need to log both things, the source of the block if it is cookie related and the resulting autoblocks out of that cookie.
I guess what I'm trying to ask here is what can we look at that will reassure us that it is working as expected?
I guess what I'm trying to ask here is what can we look at that will reassure us that it is working as expected?
We want to make sure that:
- Cookies are being set as expected.
- If user switched IP but has cookie gets blocked.
Correct?
So how about logging it when you set the cookie for anons and/or when doAutoblock is called?
I like @dmaza's idea of logging the autoblock creation rather than logging every time the block is detected. I think this will give us a clearer picture of the actual impact. It might require a bit more work though.
You are correct, and the reason why I don't think logging when we set the cookie is useful is because it will literally happen on every IP block.
Not really. The patch[1] for WikimediaEvents is done (unless you want me to change something) and all I need from core is a new Hook (AutoblockComplete) when autoblocks happen.
Change 429444 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@master] Add AutoblockComplete hook to autoblocks
Change 429444 abandoned by Dmaza:
Add AutoblockComplete hook to autoblocks
Reason:
We don't need this anymore
Change 427938 abandoned by Dmaza:
Implement event logging for IP cookie blocks autoblocks
Reason:
We are gonna be using statsd instead