Reputation: 1
I have an existing application that stores all types of documents(currently ~9TB) with full text search enabled in sql server. Now planning to migrate to Azure blob with cognitive search. I have user specific documents which should not be visible to other user while searching the document content. How to apply index tags while searching the document content(planning to have UID in index tags or metadata so that I can search the content of the users)? Is there any way to achieve it? I need to search the documents which are accessible only to the user who has access.
Ex: UserId -UID1 has doc1.txt and doc2.txt UserId -UID2 has doc3.txt and doc4.pdf When UID1 searches doc3 and doc4 content should not be visible.
Any help would be highly appreciated.
Upvotes: 0
Views: 788
Reputation: 11
Maybe I'm misreading this, but I think this question is about row-level security on documents in search results.
Cognitive Search doesn't support row-level security at the user identity level out of box, but there is a published workaround. The short explanation is that you'll need fields that store the user identity, and then you'll use a filter expression to exclude all found results that don't match on that user identity. There are two flavors of this solution depending on whether the user identity is Azure AD or something else. Here's a link to the generic identity use case: https://learn.microsoft.com/en-us/azure/search/search-security-trimming-for-azure-search
Hope that helps
Upvotes: 0