I’m playing around with dgraph in our cluster and launched the helm chart.
When I try to hit the /admin api to push a schema, I get:
{"errors":[{"message":"Request from IP: X.X.X.X","extensions":{"code":"ErrorUnauthorized"}}]}
I guess there’s an access token somewhere I need to set/retrieve, but I can’t find any configuration options for this in the documentation or in the values that are available in the helm chart.
Also, I’m assuming that this is separate to ACLs… please correct me if I’m wrong.
I found the alpha.configFile property in the helm chart, which sets the config.yaml property of alpha’s ConfigMap. I added an access_token property there, but still get unauthorised.
I’ll try the same with whitelisting.
Would be good if the defaults for these values were published somewhere.
Another reason could be IP whitelisting. By default, admin operations are allowed from the same machine on which dgraph alpha runs. If you are running admin operations from a different machine, make sure that the IP has been whitelisted.
For more details: https://dgraph.io/docs/deploy/dgraph-administration/#whitelisting-admin-operations
That worked… it was a bit tricky figuring this out. It would have helped if the error message pointed out that it was failing due to whitelisting rules!