Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
In a multi-tenant application where user data is stored in a shared database, what is the most effective method to ensure users can only access their own data through row-level security?
A
Utilize a middleware to filter data requests based on the authenticated user‘s tenant ID.
B
Create a separate database for each tenant, applying database-level permissions.
C
Apply row-level security policies directly in the database, using user roles and session variables to control access.
D
Implement database views that filter records based on the tenant ID, tied to user session context.