unlock unlimited code runs for $79, limited time →
NOSSLETTER.techLIVE
back to archive

feat: [2.6] backport row-level security

Language: Go+31746 -4043feature
concepts demonstrated
BackportingAccess control policiesAPI designData synchronization
The Issue & Context

Before this backport, Milvus 2.6 lacked row-level security (RLS), meaning users could not enforce fine-grained access control policies on individual rows during queries, DML operations, or bulk imports, limiting secure multi-tenant usage.

Root Cause Analysis

The original RLS implementation depended on APIs and data structures introduced after 2.6, including advanced metadata management, Proxy synchronization mechanisms, and policy evaluation logic incompatible with the older codebase. Additionally, differences in protobuf support and import parsing required adaptation.

Solution Strategy & Architectural Pattern

This PR backports the entire RLS feature set—metadata handling, Proxy synchronization with coherent policy/tag snapshots, policy evaluation, enforcement on queries/DML/bulk imports, and management APIs—while preserving 2.6’s existing parser and import mechanisms. It includes fixes from the RLS7 branch for tag decoding, batch validation, and policy recovery, adapted to 2.6’s protobuf and API constraints, ensuring behavior parity with master without introducing newer membership filters.

Key Takeaway for Contributors

Backporting complex features across major versions requires isolating core logic from newer dependencies and carefully adapting data serialization and API layers to maintain consistent behavior without regressing existing functionality.