Page MenuHomePhabricator

Tgr (Gergő Tisza)
Software Engineer, WMF

Today

  • No visible events.

Tomorrow

  • No visible events.

Thursday

  • No visible events.

User Details

User Since
Sep 19 2014, 4:55 PM (597 w, 3 d)
Availability
Available
IRC Nick
tgr
LDAP User
Gergő Tisza
MediaWiki User
Tgr (WMF) [ Global Accounts ]

Things my team is working on: MediaWiki-Platform-Team
Side projects I am working on (or planning to, eventually): User-Tgr
You can find more info about me on my user page.

Recent Activity

Today

Tgr added a comment to T418835: rest gateway: ensure sessionJwt matches bearer token.

I guess this is not really true since the sub is taken from the access token, so you could e.g. rotate access tokens to get around the rate limit.

Tue, Mar 3, 10:10 AM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team
Tgr added a comment to T418835: rest gateway: ensure sessionJwt matches bearer token.

...except for owner-only access tokens which do not use a prefix. But owner-only tokens are largely ignored so there shouldn't be anything needing to be combined in that case?

Tue, Mar 3, 9:49 AM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team
Tgr added a comment to T418835: rest gateway: ensure sessionJwt matches bearer token.

The prefix of the sub claim reflects the default CentralIdLookup of the given wiki, it's not affected by what kind of session handler generated it. So for SUL wikis it's always going to be mw:CentralAuth::.

Tue, Mar 3, 9:47 AM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team

Yesterday

Tgr closed T401939: Create a Wikimedia* extension for site customizations as Resolved.
Mon, Mar 2, 6:57 PM · Product Safety and Integrity, WikimediaCustomizations, MediaWiki-Platform-Team (Q3 Kanban Board), I18n, WMF-General-or-Unknown, MediaWiki-extensions-EmailAuth, MediaWiki-extensions-WikimediaEvents, Wikimedia-Site-requests
Tgr closed T401939: Create a Wikimedia* extension for site customizations, a subtask of T397244: Private mitigation blocks registration from certain email domains but gives misleading error about rate limits, as Resolved.
Mon, Mar 2, 6:57 PM · MW-1.46-notes (1.46.0-wmf.15; 2026-02-10), MediaWiki-Platform-Team (Q3 Kanban Board), WMF-General-or-Unknown, MediaWiki-Core-AuthManager
Tgr closed T401939: Create a Wikimedia* extension for site customizations, a subtask of T412034: Move Wikimedia-specific i18n messages to WikimediaCustomizations extension, as Resolved.
Mon, Mar 2, 6:57 PM · MediaWiki-extensions-WikimediaEvents, WikimediaMessages, translatewiki.net, WikimediaCustomizations
Tgr closed T401939: Create a Wikimedia* extension for site customizations, a subtask of T414301: Move HideGraphTag logic to WikimediaCustomizations, as Resolved.
Mon, Mar 2, 6:57 PM · WikimediaCustomizations
Tgr added a comment to T417864: haproxy: capture x-wmf-* headers in webrequest data set.

Can be set in X-Analytics directly in the backend response ?

Mon, Mar 2, 2:38 PM · Data-Engineering (Q3 FY25/26 January 1st - March 31th), Patch-For-Review, Traffic, MediaWiki-Platform-Team (Radar), OKR-Work, MW-Interfaces-Team
Tgr created T418720: Logstash entries should include the application ID used for the request.
Mon, Mar 2, 9:59 AM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth

Sun, Mar 1

Tgr added a parent task for T188848: All OAuth Logstash logs should include the consumer key: T418692: Improve observability of OAuth.
Sun, Mar 1, 10:33 AM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr added a parent task for T417879: Improve OAuth API usage metrics: T418692: Improve observability of OAuth.
Sun, Mar 1, 10:33 AM · MediaWiki-Platform-Team (Q3 Kanban Board), Observability-Metrics, API Platform, MediaWiki-extensions-OAuth
Tgr added a parent task for T413061: Log OAuth consumer name in Logstash when appropriate: T418692: Improve observability of OAuth.
Sun, Mar 1, 10:33 AM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-Debug-Logger, MediaWiki-extensions-OAuth
Tgr added subtasks for T418692: Improve observability of OAuth: T413061: Log OAuth consumer name in Logstash when appropriate, T188848: All OAuth Logstash logs should include the consumer key, T417879: Improve OAuth API usage metrics.
Sun, Mar 1, 10:33 AM · MediaWiki-Platform-Team (Q3 Kanban Board), Epic, MediaWiki-extensions-OAuth
Tgr created T418692: Improve observability of OAuth.
Sun, Mar 1, 10:31 AM · MediaWiki-Platform-Team (Q3 Kanban Board), Epic, MediaWiki-extensions-OAuth
Tgr added a comment to T418668: TypeError: MediaWiki\Extension\OAuth\Repository\ClaimStore::getClaims(): Argument #3 ($userIdentifier) must be of type ?string, int given, called in /srv/mediawiki/php-1.46.0-wmf.17/vendor/league/oauth2-server/src/Grant/Refresh.

3 instances so far so impact is small.

Sun, Mar 1, 10:21 AM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth, Wikimedia-production-error
Tgr added a parent task for T261462: Migrate OAuth extension back from wikimedia/oauth2-server fork to upstream: T418668: TypeError: MediaWiki\Extension\OAuth\Repository\ClaimStore::getClaims(): Argument #3 ($userIdentifier) must be of type ?string, int given, called in /srv/mediawiki/php-1.46.0-wmf.17/vendor/league/oauth2-server/src/Grant/Refresh.
Sun, Mar 1, 10:18 AM · MW-1.46-notes (1.46.0-wmf.18; 2026-03-03), ServiceOps new, ServiceOps-SharedInfra, Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MediaWiki-extensions-OAuth, Technical-Debt, Upstream
Tgr added a subtask for T418668: TypeError: MediaWiki\Extension\OAuth\Repository\ClaimStore::getClaims(): Argument #3 ($userIdentifier) must be of type ?string, int given, called in /srv/mediawiki/php-1.46.0-wmf.17/vendor/league/oauth2-server/src/Grant/Refresh: T261462: Migrate OAuth extension back from wikimedia/oauth2-server fork to upstream.
Sun, Mar 1, 10:18 AM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth, Wikimedia-production-error
Tgr added a comment to T418668: TypeError: MediaWiki\Extension\OAuth\Repository\ClaimStore::getClaims(): Argument #3 ($userIdentifier) must be of type ?string, int given, called in /srv/mediawiki/php-1.46.0-wmf.17/vendor/league/oauth2-server/src/Grant/Refresh.

Caused by RefreshTokenGrant::respondToAccessTokenRequest(). Upstream added strict_types=1 and a type conversion; our forked code skips the type conversion part. So we either need to fix the fork, or (preferably) finish T261462: Migrate OAuth extension back from wikimedia/oauth2-server fork to upstream.

Sun, Mar 1, 10:18 AM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth, Wikimedia-production-error

Sat, Feb 28

Tgr added a comment to T418668: TypeError: MediaWiki\Extension\OAuth\Repository\ClaimStore::getClaims(): Argument #3 ($userIdentifier) must be of type ?string, int given, called in /srv/mediawiki/php-1.46.0-wmf.17/vendor/league/oauth2-server/src/Grant/Refresh.

Presumably T261462: Migrate OAuth extension back from wikimedia/oauth2-server fork to upstream related - maybe the refresh token was created before rEOAUd78206b971bb: Update league/oauth2-server and dependancies and used after it?

Sat, Feb 28, 10:55 PM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth, Wikimedia-production-error

Fri, Feb 27

Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

One way to handle this is T418475: Session providers have no way to invalidate a session from provideSessionInfo() - instead of returning null from provideSessionInfo() which can result in all kinds of things depending on which other session handlers will get involved, just indicate the session is invalid, so cookies (including the JWT) get cleared.

Fri, Feb 27, 9:39 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

The log entries didn't fully stop around 18:40 but did drop by a magnitude (maybe more; logs before that were capped by the throttling Logstash applies to events with the same message and channel). The rest is presumably due to some bots (at a glance, maybe just one bot) not respecting cookie expiries.

Fri, Feb 27, 8:00 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

Bot password JWTs were disabled today at 14:40 UTC. So most likely the error will stop happening at 18:40 (JWT cookie expiry is 4 hours). Given that and that there's no obvious impact, it's probably best to wait it out. Rolling back the entire set of bot password JWT patches would be error-prone, and trying to write a fix at Friday evening, without really understanding the exact path these errors take, seems like a bad idea.

Fri, Feb 27, 4:59 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

Looking up the affected users, they are all bots. So either this is related to the use of bot passwords, or maybe to the login API more generally. Maybe these are bots which log in with a bot password, but then for some reason lose the bot password cookie without losing the JWT cookie, and then during login get an anonymous session which doesn't work due to the inconsistent JWT cookie? There are about 100/s events, that's way too high for logins though. And some of the API requests clearly aren't logins (most are POST so no way to tell).

Fri, Feb 27, 4:47 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

So apparently this happens for anonymous sessions (in CookieSessionProvider) when there is a JWT cookie. AFAICS the code was essentially the same before rMWa8dd114a4668: Session: Emit JWT cookie in ImmutableSessionProviderWithCookie, but maybe there wasn't an easy way to end up in this situation, and bot passwords somehow changed that?

Fri, Feb 27, 4:21 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.
from /srv/mediawiki/php-1.46.0-wmf.17/includes/Session/SessionManager.php(407)
#0 /srv/mediawiki/php-1.46.0-wmf.17/includes/Session/JwtSessionCookieHelper.php(158): MediaWiki\Session\SessionManager->validateJwtSubject(array, MediaWiki\User\User)
#1 /srv/mediawiki/php-1.46.0-wmf.17/includes/Session/CookieSessionProvider.php(189): MediaWiki\Session\JwtSessionCookieHelper->verifyJwtCookie(MediaWiki\Request\WebRequest, MediaWiki\Session\SessionInfo, array, array)
#2 /srv/mediawiki/php-1.46.0-wmf.17/extensions/CentralAuth/includes/session/CentralAuthSessionProvider.php(125): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(MediaWiki\Request\WebRequest)
#3 /srv/mediawiki/php-1.46.0-wmf.17/extensions/CentralAuth/includes/session/CentralAuthSessionProvider.php(218): CentralAuthSessionProvider->returnParentSessionInfo(MediaWiki\Request\WebRequest)
#4 /srv/mediawiki/php-1.46.0-wmf.17/includes/Session/SessionManager.php(569): CentralAuthSessionProvider->provideSessionInfo(MediaWiki\Request\WebRequest)
#5 /srv/mediawiki/php-1.46.0-wmf.17/includes/Session/SessionManager.php(137): MediaWiki\Session\SessionManager->getSessionInfoForRequest(MediaWiki\Request\WebRequest)
#6 /srv/mediawiki/php-1.46.0-wmf.17/includes/Request/WebRequest.php(861): MediaWiki\Session\SessionManager->getSessionForRequest(MediaWiki\Request\WebRequest)
#7 /srv/mediawiki/php-1.46.0-wmf.17/includes/Setup.php(504): MediaWiki\Request\WebRequest->getSession()
#8 /srv/mediawiki/php-1.46.0-wmf.17/includes/WebStart.php(73): require_once(string)
#9 /srv/mediawiki/php-1.46.0-wmf.17/api.php(23): require(string)
#10 /srv/mediawiki/w/api.php(3): require(string)
#11 {main}
Fri, Feb 27, 3:43 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

The logs are not down. I tested and bot password JWTs are disabled, as expected. That would imply that the real issue is rMWa8dd114a4668: Session: Emit JWT cookie in ImmutableSessionProviderWithCookie causing some problem in CookieSessionProvider / CentralAuthSessionProvider.

Fri, Feb 27, 3:02 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

It's a weekend so let's just disable for now.

Fri, Feb 27, 2:13 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

Probably it's from this line. The central IDs I see in the logs are fine, though, so not sure what's going on.

Fri, Feb 27, 2:12 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

This might ave broken bot passwords; there are five million JWT validation failed: JWT error: wrong subject log entries since yesterday. No error reports though, so not sure what's going on. (But we will have to fix it for the log volume, if nothing else.)

Fri, Feb 27, 1:17 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T418514: Have an editable "CI broken" error message that can be displayed in Gerrit.

Although I am currently busy enough that I can't quite spend time writing such a plugin, I would be quite happy to explain how to do it, or update/create whatever doc we have.

Fri, Feb 27, 11:20 AM · Continuous-Integration-Config, Gerrit

Thu, Feb 26

Tgr added a comment to T417879: Improve OAuth API usage metrics.

See also: T418458: MW/API + haproxy: capture `x-wmf-auth-type` in webrequest data set

Thu, Feb 26, 10:59 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Observability-Metrics, API Platform, MediaWiki-extensions-OAuth
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

As a nice side effect, this tanked the "Session store lookups with no user information" metric, ie. MultiBackendSessionStore now knows bot password sessions are always authenticated.

Screenshot Capture - 2026-02-26 - 23-52-03.png (752×1 px, 132 KB)

Thu, Feb 26, 10:59 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

Deployed to production.

Thu, Feb 26, 10:49 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr updated Other Assignee for T415007: Login with `action=login` and bot password does not create a JWT session cookie, added: Tgr.
Thu, Feb 26, 10:48 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr assigned T418512: Newly created Wikimedia Vote Wiki accounts unable to log in – Fatal exception “Error” to matmarex.

In theory fixed in production. I don't think I can test votewiki login so please verify.

Thu, Feb 26, 9:33 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), WikimediaCustomizations
Tgr added a comment to T418042: rest gateway: use rlc from sessionJwt cookie even when a bearer token is used.

These are the possible authentication types (once we finish the pending bot pw / OAuth work):

session typeJWT cookieAuthorization header
normal web-basedyesno
bot passwordyesno
OAuth 1yesyes, but not a JWT
OAuth 2 owner-onlyyesyes, but no rlc field
OAuth 2 (normal)noyes
Thu, Feb 26, 5:10 PM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team
Tgr created T418514: Have an editable "CI broken" error message that can be displayed in Gerrit.
Thu, Feb 26, 4:52 PM · Continuous-Integration-Config, Gerrit
Tgr added a comment to T418507: Move wmfGetPrivilegedGroups(), $wmgPrivilegedGroups, $wmgPrivilegedGlobalGroups, GetSecurityLogContext and PasswordPoliciesForUser hook handlers to WikimediaCustomizations.

I'd say PSI, these don't have much to do with MWP's scope, even if wmfGetPrivilegedGroups() does a CentralAuth call or two. (There is a bunch of authentication-related hooks in the configuration, those should be also moved, and those should be owned by MWP.)

Thu, Feb 26, 4:22 PM · MediaWiki-Platform-Team (Q3 Kanban Board), WikimediaCustomizations, WMF-General-or-Unknown, Product Safety and Integrity
Tgr claimed T417833: Set a JWT cookie for OAuth 1 requests and OAuth 2 owner-only requests.
Thu, Feb 26, 1:24 PM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T418475: Session providers have no way to invalidate a session from provideSessionInfo().

We should probably introduce an explicit invalid value for UserInfo, to tell SessionManager to unpersist.

Thu, Feb 26, 1:19 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Patch-For-Review, MediaWiki-Core-AuthManager
Tgr updated the task description for T418475: Session providers have no way to invalidate a session from provideSessionInfo().
Thu, Feb 26, 1:18 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Patch-For-Review, MediaWiki-Core-AuthManager
Tgr added a project to T418475: Session providers have no way to invalidate a session from provideSessionInfo(): MediaWiki-Core-AuthManager.
Thu, Feb 26, 1:17 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Patch-For-Review, MediaWiki-Core-AuthManager
Tgr created T418475: Session providers have no way to invalidate a session from provideSessionInfo().
Thu, Feb 26, 1:17 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Patch-For-Review, MediaWiki-Core-AuthManager
Tgr added a comment to T418458: MW/API + haproxy: capture `x-wmf-auth-type` in webrequest data set.

Do you want to differentiate between owner-only and normal access tokens? (For OAuth 2; I don't think it's possible for OAuth 1.) If so, maybe it makes sense to put the logic into Envoy to keep the logic related to JWT internals in one place. (AIUI the edge will validate the JWT signature but not do much else.)

Thu, Feb 26, 1:04 PM · MediaWiki-Platform-Team (Radar), OKR-Work, MW-Interfaces-Team

Wed, Feb 25

Tgr added a subtask for T372196: Unticking the Gerrit "resolved" tick box sometimes doesn't work: T400688: Upgrade Gerrit from 3.10.6 to 3.10.9.
Wed, Feb 25, 5:20 PM · Gerrit
Tgr added a parent task for T400688: Upgrade Gerrit from 3.10.6 to 3.10.9: T372196: Unticking the Gerrit "resolved" tick box sometimes doesn't work.
Wed, Feb 25, 5:20 PM · Gerrit (Gerrit 3.10)
Tgr added a comment to T372196: Unticking the Gerrit "resolved" tick box sometimes doesn't work.

This upstream issue sounds similar (although it is talking about replies, not top-level comments).

if the Resolved checkbox is unchecked just before hitting the send button, this selection is ignored and the comment remain marked as resolved. If the comment is modified after the checkbox is used, this issue does not occur.

Wed, Feb 25, 5:18 PM · Gerrit
Tgr added a comment to T417278: Choosing client credentials grant for OAuth 2 results in an anonymous access token.

I think if we go this way, we'd want them mutually exclusive because client-credentials apps are conceptually like owner-only apps, so human review could be relaxed. Also we might want a more dedicated registration UI. If someone needs both client credentials and authorization code flow, it's not too much hassle to register two separate consumers.

Wed, Feb 25, 2:26 PM · Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth

Tue, Feb 24

Tgr added a comment to T415588: Add rate limit class for accounts that are in a local bot group on any wiki.

JWT cookies / access tokens are regenerated every four hours (except owner-only access tokens but those don't get rlc anyway) so every token should have the right rlc by now.

Tue, Feb 24, 8:25 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), User-notice, Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), WMF-General-or-Unknown
Tgr created T418227: Automatic global group membership should be surfaced on Special:GlobalGroupPermissions.
Tue, Feb 24, 11:57 AM · MW-1.46-notes (1.46.0-wmf.18; 2026-03-03), Product Safety and Integrity, MediaWiki-extensions-CentralAuth, MediaWiki-Platform-Team
Tgr added a comment to T415588: Add rate limit class for accounts that are in a local bot group on any wiki.
tgr@deploy2002:~$ foreachwikiindblist sul CentralAuth:UpdateAutomaticGlobalGroupMembership --local-group=bot | tee T415588.log
Tue, Feb 24, 11:45 AM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), User-notice, Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), WMF-General-or-Unknown

Mon, Feb 23

Tgr added a comment to T416541: Automatic global group membership is updated on unrelated local group changes.
tgr@deploy2002:~$ foreachwikiindblist sul CentralAuth:UpdateAutomaticGlobalGroupMembership --local-group=checkuser --local-group=suppress | tee T416541.log
Mon, Feb 23, 10:10 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), MediaWiki-Platform-Team (Q3 Kanban Board), Trust and Safety Product Team, MediaWiki-extensions-CentralAuth
Tgr added a comment to T416541: Automatic global group membership is updated on unrelated local group changes.

You could always just configure a global-temporary-account-viewer-2 group on beta, re-run the script, and see what happens. That's guaranteed to be empty at start.

Mon, Feb 23, 7:05 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), MediaWiki-Platform-Team (Q3 Kanban Board), Trust and Safety Product Team, MediaWiki-extensions-CentralAuth
Tgr added a comment to T369186: PHP Warning: Cannot modify header information - headers already sent by includes/libs/http/MultiHttpClient.php.

Or the output stream gets misconfigured - at a glance, SwiftFileBackend will first make an authentication request refreshAuthentication() and then a request for the actual image, so maybe the body output is from the first one.

Mon, Feb 23, 1:34 PM · MW-Interfaces-Team, MediaWiki-libs-HTTP, SRE-swift-storage, Wikimedia-production-error
Tgr added a comment to T418042: rest gateway: use rlc from sessionJwt cookie even when a bearer token is used.

OAuthRateLimiter sets higher rate limits for select applications, and it's based on consumer ID, not user ID, so it cannot be reproduced in the normal session cookie. (It can be reproduced in the OAuth session cookie, but with cookies you can never be sure which one you get.) That said, there are like five such applications and they are all internal or use OAuth 1, so I'm probably overcomplicating things here and this is an academic concern only.

Mon, Feb 23, 1:16 PM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team

Sun, Feb 22

Tgr added a comment to T418042: rest gateway: use rlc from sessionJwt cookie even when a bearer token is used.

The format of this field is not quite the same, right? We'd have to parse it to extract the user ID?

Sun, Feb 22, 11:12 PM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team
Tgr added a comment to T418042: rest gateway: use rlc from sessionJwt cookie even when a bearer token is used.

The more ideal version would probably treat the request as untrusted if the sub field of the cookie JWT and the access token differs, and prefer the rlc from the access token if they have the same subject. (Owner-only access tokens won't have an rlc field. For non-owner-only access tokens, in the future the rlc might be more permissive compared to a cookie, due to T409305: API tokens: use rate limit classes instead of rate limit overrides in the API gateway.)

Sun, Feb 22, 11:31 AM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team
Tgr added a comment to T418042: rest gateway: use rlc from sessionJwt cookie even when a bearer token is used.

The simplest version would be to just ignore the header when the cookie is present. That is not ideal, but can be made work if we ensure on the MediaWiki side that requests with a mismatching bearer token and cookie get rejected. The reason that's not ideal is that the cookie might not really be under the control of the client, in case of JS-based clients (which are not used much, and until recently, have been implemented weirdly (T323867: Clarify use of non-confidential OAuth 2.0 clients) but they do exist), and the cookie name is shared with normal cookie-based sessions, so an OAuth client might accidentally end up sending a cookie that breaks it. (We could use a different cookie name, but I imagine that would complicate things in Envoy in a different direction.)

Sun, Feb 22, 11:25 AM · MediaWiki-Platform-Team (Q3 Kanban Board), OKR-Work, MW-Interfaces-Team

Fri, Feb 20

Tgr created T417989: Limit the number of bot passwords per user.
Fri, Feb 20, 1:59 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), MediaWiki-Platform-Team, MediaWiki-Core-AuthManager
Tgr added a comment to T417839: Editing using OAuth 2 doesn’t work.

Not for this incident specifically, but we are planning to update tests in the next few weeks (T415281: [EPIC] OAuth extension critical workflows (for automated tests enhancement)).

Fri, Feb 20, 11:26 AM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), SRE, MediaWiki-Platform-Team, MediaWiki-extensions-OAuth

Thu, Feb 19

Tgr added a comment to T417674: Include contributors count in REST Attribution endpoint.

In any case it's only doing a filesort because you are grouping it on another table + sorting the results (which might be necessary if you need to list people in the order of their last contributions, but for a count it's irrelevant).

SELECT  
    actor_user AS `user_id`,
    actor_name AS `user_name`,
    MIN(rev_actor) AS `actor_id`,
    MIN(user_real_name) AS `user_real_name`,
    MAX(rev_timestamp) AS `timestamp`  
FROM 
    `revision` 
    JOIN `actor` ON ((rev_actor = actor_id)) 
    LEFT JOIN `user` ON ((actor_user = user_id))  
WHERE 
  rev_page = 55943877 
  AND (rev_actor != 31) 
  AND ((rev_deleted & 4) = 0)  
GROUP BY 
  rev_actor
Thu, Feb 19, 10:12 PM · MW-Interfaces-Team (MWI-Sprint-28 (2026-02-24 to 2026-03-10)), Spike, OKR-Work
Tgr updated subscribers of T417278: Choosing client credentials grant for OAuth 2 results in an anonymous access token.

From what I've read about the client credentials grant, it's intended that it is not associated with any user, because it's instead associated with the client (aka the app).

Thu, Feb 19, 9:17 PM · Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr added a comment to T407987: Define best practice for single-user apps which need a high MediaWiki API rate limit.

We should audit the full list of differences between owner-only and normal code paths, it would give us a better idea of what features need to be recreated in whatever we use for the new recommended single-user OAuth mechanism.

Thu, Feb 19, 9:14 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth
Tgr added a comment to T407987: Define best practice for single-user apps which need a high MediaWiki API rate limit.

Should they use a normal OAuth 2 app with the Client Credentials grant?

Thu, Feb 19, 9:11 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth
Tgr created T417924: Account compromise alerts should ignore bot password login attempts.
Thu, Feb 19, 6:52 PM · MediaWiki-Platform-Team, Security, MediaWiki-Core-AuthManager
Tgr added a hashtag to MediaWiki-Platform-Team (Radar): #mwp-radar.
Thu, Feb 19, 12:48 PM
Tgr moved T417854: OAuth requests from Zeto app get throttled from Backlog to Radar/Not for Service on the Traffic board.
Thu, Feb 19, 12:47 PM · MediaWiki-Platform-Team (Radar), Traffic, MediaWiki-extensions-OAuth
Tgr added a project to T417854: OAuth requests from Zeto app get throttled: Traffic.
Thu, Feb 19, 12:45 PM · MediaWiki-Platform-Team (Radar), Traffic, MediaWiki-extensions-OAuth
Tgr renamed T417854: OAuth requests from Zeto app get throttled from Higher OAuth rate limit (tier) request for external website to OAuth requests from Zeto app get throttled.
Thu, Feb 19, 12:43 PM · MediaWiki-Platform-Team (Radar), Traffic, MediaWiki-extensions-OAuth
Tgr added a comment to T417854: OAuth requests from Zeto app get throttled.

Probably you are not setting a sensible user agent and so the requests get throttled aggressively. See https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_User-Agent_Policy

Thu, Feb 19, 12:42 PM · MediaWiki-Platform-Team (Radar), Traffic, MediaWiki-extensions-OAuth
Tgr created T417879: Improve OAuth API usage metrics.
Thu, Feb 19, 12:14 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Observability-Metrics, API Platform, MediaWiki-extensions-OAuth
Tgr added a comment to T417839: Editing using OAuth 2 doesn’t work.

Would have been nice to get a Phan warning for this. The Builder is marked @immutable, and Phan understands that, but it seems that because internally the class does actually set the variables when creating a copy, the error is raised in the library code, not the calling code, and so we don't see it.

Thu, Feb 19, 10:06 AM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), SRE, MediaWiki-Platform-Team, MediaWiki-extensions-OAuth

Wed, Feb 18

Tgr added a subtask for T395459: Use OAuth rather than password-based login for Wikimedia mobile apps: T323855: OAuth 2.0 non-confidential clients cannot use refresh tokens without client secret.
Wed, Feb 18, 10:10 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Epic, Security, Wikipedia-iOS-App-Backlog, Wikipedia-Android-App-Backlog, MediaWiki-extensions-OAuth
Tgr added a parent task for T323855: OAuth 2.0 non-confidential clients cannot use refresh tokens without client secret: T395459: Use OAuth rather than password-based login for Wikimedia mobile apps.
Wed, Feb 18, 10:10 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Upstream, MediaWiki-extensions-OAuth
Tgr added a comment to T323855: OAuth 2.0 non-confidential clients cannot use refresh tokens without client secret.

We use a fork of 9.3 now. @LucasWerkmeister can you check whether this is fixed?

Wed, Feb 18, 10:09 PM · MediaWiki-Platform-Team (Q3 Kanban Board), Upstream, MediaWiki-extensions-OAuth
Tgr created T417833: Set a JWT cookie for OAuth 1 requests and OAuth 2 owner-only requests.
Wed, Feb 18, 9:50 PM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T417820: TypeError: MediaWiki\Extension\OAuth\Entity\AccessTokenEntity::setUserIdentifier(): Argument #1 ($identifier) must be of type string, null given, called in AccessTokenEntity.php.

FWIW the patch doesn't 100% restore the pre-upgrade behavior. Back then the user identifier was set to the empty string, now it's null, so the resulting JWT is slightly different. Probably doesn't make any difference.

Wed, Feb 18, 9:21 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Wikimedia-production-error
Tgr added a comment to T417598: Anonymous CORS is always enabled for the action API but disabled by default for the REST API, which is confusing.

Yes, thanks, fixed.

Wed, Feb 18, 9:03 PM · MW-Interfaces-Team, Security, MediaWiki-REST-API
Tgr updated the task description for T417598: Anonymous CORS is always enabled for the action API but disabled by default for the REST API, which is confusing.
Wed, Feb 18, 9:03 PM · MW-Interfaces-Team, Security, MediaWiki-REST-API
Tgr added a comment to T417600: Rename CentralAuth maintenance scripts to match their class name.

Interesting, I get

Script 'CentralAuth:FixStuckGlobalRename' not found (tried path '/vagrant/mediawiki/extensions/CentralAuth/maintenance/FixStuckGlobalRename.php' and class 'MediaWiki\Extension\CentralAuth\Maintenance\FixStuckGlobalRename').
Wed, Feb 18, 9:01 PM · MediaWiki-Platform-Team, Technical-Debt, MediaWiki-extensions-CentralAuth
Tgr added a comment to T417766: Password reset broken on Android App.

(No way to filter for password resets in the Android app, unfortunately. gerrit 1240375 will fix that.)

Wed, Feb 18, 8:48 PM · Wikipedia-Android-App-Backlog (Android Release - FY2025-26)
Tgr added a comment to T417766: Password reset broken on Android App.

Successful resets, failed resets. Seem stable.

Wed, Feb 18, 8:43 PM · Wikipedia-Android-App-Backlog (Android Release - FY2025-26)
Tgr added a comment to T417605: Break asymmetric direct cyclic dependencies of top level components of mediawiki core.

I'm not sure LoginHelper::getValidErrorMessages() is presentation logic.

Wed, Feb 18, 8:29 PM · MediaWiki-General
Tgr added a comment to T417730: Error: Class "EmptyIterator" not found.

How can it not find EmptyIterator?

Wed, Feb 18, 8:27 PM · css-sanitizer, Wikimedia-production-error
Tgr added a comment to T417820: TypeError: MediaWiki\Extension\OAuth\Entity\AccessTokenEntity::setUserIdentifier(): Argument #1 ($identifier) must be of type string, null given, called in AccessTokenEntity.php.

Might be a train blocker, depending on what kind of clients use the client credentials endpoint (unfortunately we don't log the user agent for exceptions, and in any case the group 1 data wouldn't be that informative).

Wed, Feb 18, 8:21 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Wikimedia-production-error
Tgr added a comment to T417820: TypeError: MediaWiki\Extension\OAuth\Entity\AccessTokenEntity::setUserIdentifier(): Argument #1 ($identifier) must be of type string, null given, called in AccessTokenEntity.php.

Should probably do a quick fix rather than waiting for the client credentials issue to be fully worked out.

Wed, Feb 18, 8:14 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Wikimedia-production-error
Tgr added a comment to T417820: TypeError: MediaWiki\Extension\OAuth\Entity\AccessTokenEntity::setUserIdentifier(): Argument #1 ($identifier) must be of type string, null given, called in AccessTokenEntity.php.

We are working on this in T417278: Choosing client credentials grant for OAuth 2 results in an anonymous access token. Sorry, I was sure nothing uses this in production.

Wed, Feb 18, 8:11 PM · MW-1.46-notes (1.46.0-wmf.16; 2026-02-17), MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Wikimedia-production-error
Tgr added a comment to T417278: Choosing client credentials grant for OAuth 2 results in an anonymous access token.

I paused briefly and authorized the consumer (which I would have already done). Is this step necessary @Tgr? I think it is necessary.

Wed, Feb 18, 5:13 PM · Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth

Tue, Feb 17

Tgr added a comment to T417278: Choosing client credentials grant for OAuth 2 results in an anonymous access token.

This blocks T412214: Ensure a good experience for apps which want to use OAuth credentials for a long time if we want to solve it with client credentials (which we probably do).

Tue, Feb 17, 11:54 PM · Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr closed T407655: Document how access tokens with an oaac_id of 0 are used as Resolved.
Tue, Feb 17, 8:52 PM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr added a comment to T407655: Document how access tokens with an oaac_id of 0 are used.

So apparently when access tokens are issued via the client credentials flow (that is, making an API call to /oauth2/access_token with the client ID and secret), the oauth2-server library issues an access token with no user ID (sub is the empty string), and does not create a ConsumerAcceptance record. This logic is to make sure that such access tokens are accepted.

Tue, Feb 17, 8:52 PM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr claimed T407655: Document how access tokens with an oaac_id of 0 are used.
Tue, Feb 17, 8:22 PM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr claimed T417278: Choosing client credentials grant for OAuth 2 results in an anonymous access token.
Tue, Feb 17, 7:39 PM · Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr created T417690: Remove $wgOAuth2UsePrefixedSub.
Tue, Feb 17, 7:18 PM · MediaWiki-Platform-Team (Q3 Kanban Board), MediaWiki-extensions-OAuth
Tgr added a comment to T415007: Login with `action=login` and bot password does not create a JWT session cookie.

Turns out this is harder than it seemed.

Tue, Feb 17, 7:02 PM · MW-1.46-notes (1.46.0-wmf.17; 2026-02-24), Patch-For-Review, MediaWiki-Platform-Team (Q3 Kanban Board), Traffic, API Platform, MediaWiki-User-login-and-signup
Tgr added a comment to T417605: Break asymmetric direct cyclic dependencies of top level components of mediawiki core.

A number of MWException subclasses do presentation layer work, UserNotLoggedIn is one of them. Not great but doesn't have much to do with cross-namespace dependencies IMO. Distributing exception classes across namespaces, so that exceptions related to a specific component are within that component (like we do, somewhat, for hooks) would be a reasonable arrangement, but having presentation logic in exception classes would be still bad.

Tue, Feb 17, 6:31 PM · MediaWiki-General
Tgr added a comment to T417605: Break asymmetric direct cyclic dependencies of top level components of mediawiki core.

I'm sketpical about treating present-day namespaces as meaningful component boundaries. Neither "all special pages" nor "all exceptions" is a reasonable component where not depending on other components would be a useful goal, IMO.

Tue, Feb 17, 1:21 PM · MediaWiki-General

Mon, Feb 16

Tgr created T417600: Rename CentralAuth maintenance scripts to match their class name.
Mon, Feb 16, 9:59 PM · MediaWiki-Platform-Team, Technical-Debt, MediaWiki-extensions-CentralAuth
Tgr updated the task description for T417598: Anonymous CORS is always enabled for the action API but disabled by default for the REST API, which is confusing.
Mon, Feb 16, 9:45 PM · MW-Interfaces-Team, Security, MediaWiki-REST-API
Tgr created T417598: Anonymous CORS is always enabled for the action API but disabled by default for the REST API, which is confusing.
Mon, Feb 16, 9:39 PM · MW-Interfaces-Team, Security, MediaWiki-REST-API