how can i get only indore employee data using cerb...
# help
b
how can i get only indore employee data using cerbos "employee": [ { "id": "1", "firstName": "Tom", "lastName": "Cruise", "city": "indore" }, { "id": "2", "firstName": "Maria", "lastName": "Sharapova", "city":"indore" }, { "id": "3", "firstName": "James", "lastName": "Bond", "city":"ujjain" } ]
a
Can you expand a bit on what you are trying to do? Are you looking for a condition to add to a policy?
b
i have employee list JSON and i want filter only city=indore employee, so how can i filter data using cerbos policy ?
a
Can you share the resource policy you have already?
Cerbos isn't a querying engine, rather a policy engine which can test if a a specific principal can do a specific action on a specific resource primarily (with filtering possible via the Query Plan API also)
b
i don't have any policy but i want those think apply on my business, so please how can achieved
a
Ok you need to start by defining a resource policy for your employee resource kind before doing anything else. I would suggest following this tutorial which takes you through building policies https://docs.cerbos.dev/cerbos/latest/tutorial/00_intro