Page MenuHomePhabricator

🟦️ Authenticate and authorize as mediawiki user when making DELETE and PUT requests to REST API statement routes
Closed, ResolvedPublic3 Estimated Story Points

Description

As a gadget author I would like the user changing statements using the gadget to be authenticated so that they could be credited to the changes they make.
As a gadget author I would like the user changing statements using the gadget to be authorized so that the wiki's editing restrictions are not violated.

Bearer-token based authentication using Authorization HTTP header should be used.

Currently POST requests to /entities/items/{item_id}/statements handle the authentication.

The following requests should also authenticate and authorize the mediawiki user:
DELETE /entities/items/{item_id}/statements/{statement_id}
DELETE /statements/{statement_id}
PUT /entities/items/{item_id}/statements/{statement_id}
PUT /statements/{statement_id}

Event Timeline

WMDE-leszek renamed this task from Authenticate as mediawiki user when making DELETE, PUT and PATCH requests to REST API statement routes to Authenticate and authorize as mediawiki user when making DELETE, PUT and PATCH requests to REST API statement routes.Jul 11 2022, 9:34 AM
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek set the point value for this task to 3.
Jakob_WMDE renamed this task from Authenticate and authorize as mediawiki user when making DELETE, PUT and PATCH requests to REST API statement routes to Authenticate and authorize as mediawiki user when making DELETE and PUT requests to REST API statement routes.Jul 27 2022, 12:52 PM
Jakob_WMDE updated the task description. (Show Details)

Notes from task breakdown:

Task 1: Check authorization for DELETE statement requests - @Ollie.Shotton_WMDE creates ticket

  • check in use case via PermissionChecker
  • tests for both route handlers

Task 2: Check authorization for PUT statement requests - @Silvan_WMDE creates ticket

  • check in use case via PermissionChecker
  • tests for both route handlers
Jakob_WMDE renamed this task from Authenticate and authorize as mediawiki user when making DELETE and PUT requests to REST API statement routes to 🟦️ Authenticate and authorize as mediawiki user when making DELETE and PUT requests to REST API statement routes.Jul 27 2022, 1:00 PM

@WMDE-leszek: Assuming this task is resolved. Thus setting resolved task status. Please reopen and add an active project tag if that is not the case. Thanks.