This repository was archived by the owner on Jan 21, 2022. It is now read-only.
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
Authorization check performed after reading the document #545
Open
Description
Currently, in order to perform authorization checks, the relevant document is first read from the database, and only then the passed OAuth scopes are compared to the required OAuth scopes. This is because in order to build the required scopes a resource_id
is needed, but it is usually not part of the request, but part of the document.
This is not ok, as one could try a DOS attack against Abacus using an invalid token. Instead, it should be possible to retrieve the resource_id
from the account plugin (there it's usually cached), perform the authorization check, and only if successful proceed with retrieving the document.