
Explanation:
Correct Answer: C
Applying row-level security policies directly in the database, using user roles and session variables to control access, is the most effective method for ensuring users can only access their own data in a multi-tenant application. This approach offers several advantages:
This method ensures consistent and secure data access across the application, tailored to each user's permissions and context.
Ultimate access to all questions.
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.
No comments yet.