https://cerbos.dev logo
#help
Title
# help
b

Balwan singh

09/15/2023, 9:26 AM
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

Alex Olivier (Cerbos)

09/15/2023, 10:02 AM
Can you expand a bit on what you are trying to do? Are you looking for a condition to add to a policy?
b

Balwan singh

09/15/2023, 10:06 AM
i have employee list JSON and i want filter only city=indore employee, so how can i filter data using cerbos policy ?
a

Alex Olivier (Cerbos)

09/15/2023, 10:07 AM
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

Balwan singh

09/15/2023, 10:08 AM
i don't have any policy but i want those think apply on my business, so please how can achieved
a

Alex Olivier (Cerbos)

09/15/2023, 10:10 AM
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
4 Views