While it is trivial to restrict a method to authenticated and authorized users, when you set the db identifier in the query strings, you open the possibility that an authenticated and authorized user can look for access to records that they do not have. This is especially important when the db identifier is an integer or other frivolous identifier. Using guides as db identifiers can reduce the risk of this, although not entirely.
What you always need to remember DOES NOT ALLOW ENTRANCE. Security through obscurity (e.g., encryption, etc.) is not a reliable technique. Your service should always check if the current user is allowed to receive the requested records. This is sometimes called row-level security. This can only be done programmatically.
for example, instead of determining that someone is allowed to view the record, you need to make sure that they have access rights to the record they request.
This means that you need a way to bind records to an authenticated user.
BTW: any HTTP request is checked for potentially dangerous input.
Hope this helps,
source share