Hi I have done a small POC in Cerebos using Rest A...
# help
a
Hi I have done a small POC in Cerebos using Rest Api and I used MySQL database. Now I changed all my rest API calls (addPolicy and checkPolicy) to grpc call after that I tried to run the docker compose but I got the below error.Do we need to do any changes in Dockerfile/Dockercomposefile/config.yaml file while changing from Rest API to grpc?
a
Hey that error is about Cerbos instance not being able to connect to the database rather than the rest/grpc change.
Is your DB running on that IP/port?
a
Screenshot_2023-01-19_15-06-15.png
Screenshot_2023-01-19_15-07-01.png
a
The error would imply that it isn’t running on
172.18.0.2:3306
so my guess would be the IP is different
can you use the DNS name?
a
ok let me try
thanks its connected to DB everything is working fine but still getting 1 error
2023-01-19 173212 {"log.level":"error","@timestamp":"2023-01-19T120212.578Z","log.logger":"cerbos.compiler","message":"Failed to recompile","id":{},"error":"1 compilation errors\nunknown<cerbos.resource.contact.vdefault/nokia> Missing ancestor policy \"resource.contact.vdefault\" (missing policy definition)"}
c
That means that you have a scoped policy set that's missing the "no scope" (empty) policy. Essentially, you have to create a
contact
policy with an empty
scope
. It could be a policy without any rules, but it must exist.
a
@Charith (Cerbos) thank you for the update
yes tried, error gone!! Thanks @Charith (Cerbos) and @Alex Olivier (Cerbos)