has any one done any kind of integration between a...
# community
j
has any one done any kind of integration between a crm system and cerbos policies? a business user modifies a customer's subscription in the crm system and the end result is cerbos policies get updated to reflect that.
f
Do you have any questions regarding the integration between your CRM and Cerbos? The case you mentioned seems to be quite achievable through Cerbos APIs. We have an admin API that does quite the same.
a
Hey @Jesum Yip, As @Farzad Soltani mentioned (nicely spotted btw), this is possible through using the admin api. https://docs.cerbos.dev/cerbos/latest/api/admin_api Feel free to browse the api docs, specifically the following that you can utilize: https://docs.cerbos.dev/cerbos/latest/api/admin_api#_addupdate_policies to add/update the policies.
j
the case is simple - what if a business user wants to set a customer's subscription to expire on the 15th of April 2029? Or allow a specific role from the customer access to resource-A, resource-B, and resource-C?
i guess i have to write a middleware that translates the business user's interaction into admin api calls
f
Yes, exactly. The middleware should transform your business logic to Cerbos API calls.
j
i would also like to have a base set of permissions for reosurce-X which the middleware will maintain then more esoteric ones managed by hand
is it possible to split it into 2 separate yamls?
f
Yes, you can use derived roles to achieve this.
j
i'll take a look. thanks!
This is the beauty of Cerbos in my opinion. It's not opinionated and it has no room for business logic. It does what it's supposed to do in the best and most efficient way possible.
j
but every resource yaml lokos like this: apiVersion: api.cerbos.dev/v1 resourcePolicy: resource: myresourcename
can i have 2 yamls with the same resourcePolicy.resource value?
just exploring ideas
f
I haven't done this yet as I'm a beginner just like you. But I don't think there's anything blocking you to do so.
j
okay will run some experiments
f
Share your results if you like. I'm interested in the things you might come across as your requirements are already more complex than mine.