How to grant roles from other system to elasticsearch?

At work. User want to log data to elasticsearch(development by C#, NEST, ..)
In the system, I have a lot user with multiple roles in my sql and UI search data from elasticsearch.

But I have a problem. User want to login userA (roles are "admin", "manager", "companyA") from webapp. So when user has updated some information and that will store to mysql and elasticsearch.
After User login to userB (roles are "manager", "companyB"). User go to search page of elasticsearch.

User should see own data .
UserB cant see data of userA because UserB is employee of companyB.

How to do that? Please help me.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.