Napoleon Ponaparte
05/14/2022, 10:26 AMAlex Olivier (Cerbos)
docker compose up
is up and running you can interact the API via exposed on port 9999Alex Olivier (Cerbos)
Alex Olivier (Cerbos)
Alex Olivier (Cerbos)
<http://gcr.io/distroless/base|gcr.io/distroless/base>
)Napoleon Ponaparte
05/14/2022, 10:37 AMNapoleon Ponaparte
05/14/2022, 10:37 AMNapoleon Ponaparte
05/14/2022, 10:38 AMNapoleon Ponaparte
05/14/2022, 10:38 AMNapoleon Ponaparte
05/14/2022, 10:40 AMAlex Olivier (Cerbos)
Alex Olivier (Cerbos)
Napoleon Ponaparte
05/14/2022, 11:29 AMNapoleon Ponaparte
05/14/2022, 11:29 AMoguzhan
Cerbos
to use a MySQL
database as a store for your policies.
From the looks of your table, you’ve no policies stored in the system. In order to do so, you need to use Admin API of the Cerbos
.
The Admin API must be enabled by setting server.adminAPI.enabled
to true
in config.yaml
. (See the config structure here if you have some doubts how to put enabled
flag. You may configure username
and passwordHash
too.)
Once you enable the Admin API with the credentials you have provided in configuration, you are authorized to send a request to an endpoint of Admin API. In your case, you need to use the endpoint POST /admin/policy
.
Please see the documentation for Admin API here.
NOTE
If you are using curl , you can provide username and password for the Admin API with -u flag like this;
curl -u cerbos:cerbosPassw <REST OF THE PARAMS>
Napoleon Ponaparte
05/14/2022, 2:38 PM