Question 470
A multi-tenant chat service needs to forbid readers from accessing other tenant documents even if developers omit a WHERE clause. What result MOST directly verifies that the solution works?
Explanation
Correct Answer
Database-enforced row-level security protects data independently of application filter correctness. The observed result “An unauthorized role cannot SELECT another tenant's rows even through a broad query” would confirm the change “Implement appropriate PostgreSQL row-level security policies with tested role scoping” in this situation: A multi-tenant chat service needs to forbid readers from accessing other tenant documents even if developers omit a WHERE clause.
Incorrect Answers
Vector similarity does not replace SQL tenant isolation or database authorization. The situation here is: A multi-tenant chat service needs to forbid readers from accessing other tenant documents even if developers omit a WHERE clause. A test of this alternative would miss the specific outcome “An unauthorized role cannot SELECT another tenant's rows even through a broad query”.
The pgvector extension adds vector data types and similarity operators to PostgreSQL. The situation here is: A multi-tenant chat service needs to forbid readers from accessing other tenant documents even if developers omit a WHERE clause. A test of this alternative would miss the specific outcome “An unauthorized role cannot SELECT another tenant's rows even through a broad query”.
Reducing projected columns limits serialization and transport overhead from high-dimensional data. The situation here is: A multi-tenant chat service needs to forbid readers from accessing other tenant documents even if developers omit a WHERE clause. A test of this alternative would miss the specific outcome “An unauthorized role cannot SELECT another tenant's rows even through a broad query”.