-
Hey, we plan to use cerbos with database as storage type and we are wondering if there is some easy way to start cerbos with an initial data migration? (f.e. json policies that where red and persisted to mysql database at very first startup) We want to run cerbos inside a private network and we will not be able to access the admin api at the very first beginning of our implementation. Are there any recommendations ? Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You could start an instance of Cerbos on a dev machine with a local MySQL instance, use If you don't have access to the database either, you could do a slight variation of this by creating a bootstrap script that uses |
Beta Was this translation helpful? Give feedback.
You could start an instance of Cerbos on a dev machine with a local MySQL instance, use
cerbosctl put
to load up your initial set of policies, and use a tool likemysqldump
to export the data as a SQL script that you can then use to seed your production database.If you don't have access to the database either, you could do a slight variation of this by creating a bootstrap script that uses
cerbosctl put
to load the policies into Cerbos once it has started up inside the private network. The invocation ofcerbosctl put
is idempotent so you don't have to worry about running it more than once.