Imadul Islam
11/03/2022, 2:54 PMCerbos
. I was trying to run Cerbos
with MySQL
. There is a doc for how to run and create schemas. But I could not find any doc how should I insert my policies on the MySQL
tables.
Sample Finance Application Policy
https://play.cerbos.dev/p/XhkOi82fFKk3YW60e2c806Yvm0trKEje
This is the playground URL I was trying to read from MySQL
.
Thanksoguzhan
11/03/2022, 3:31 PMserver
in your configuration like this (Also, here is the list of all possible configuration options if you’d like to explore more);
server:
adminAPI:
adminCredentials:
passwordHash: JDJ5JDEwJEdEOVFzZDE2VVhoVkR0N2VkUFBVM09nalc0QnNZaC9xc2E4bS9mcUJJcEZXenp5OUpjMi91Cgo= # PasswordHash is the base64-encoded bcrypt hash of the password to use for authentication.
username: cerbos # Username is the hardcoded username to use for authentication.
enabled: true # Enabled defines whether the admin API is enabled.
Here is the relevant part to send a request to the AdminAPI for adding/updating policies;
https://docs.cerbos.dev/cerbos/latest/api/admin_api.html#_addupdate_policiescerbosctl
CLI.
https://docs.cerbos.dev/cerbos/latest/cli/cerbosctl.html#put
Hope this helps, please let me know if you encounter any problems or have any questions.Imadul Islam
11/03/2022, 3:38 PMSam Lock (Cerbos)
11/07/2022, 3:38 PMImadul Islam
11/08/2022, 6:00 AM