Page MenuHomePhabricator

Document CSRF token body parameters in TokenAware handlers
Open, MediumPublic3 Estimated Story Points

Description

Document the CSRF token body parameter in TokenAwareHandlerTrait, and ReadingListsTokenAwareHandlerTrait in the ReadingLists extension, using a descriptive, translatable system message. Since OpenAPI 3.0 does not allow request body payloads, such as CSRF tokens, to be defined in the global securitySchemes object, we must document this conditional constraint inline on the parameters themselves.

The description should express that CSRF is conditional. CSRF is required for Cookie-based sessions, but not for OAuth because OAuth is CSRF-safe.

Conditions of Acceptance

References

View of This Task in Context of Related Tasks

implementation_tasks_result_T423552_spike_security_scheme_information_MediaWiki_REST_API_description.png (4,372×8,192 px, 1 MB)

Event Timeline

Async estimate results:

3 points:  4 votes (@Moriel (she/her), @aschulz, @aghirelli, @Hua Szu Yang
2 points: 2 votes (@BPirkle, @mgoncalves)
1 point: 1 vote (@aschulz)

BPirkle set the point value for this task to 3.Jun 4 2026, 2:12 PM

Decided on a 3 after sync discussion