Graphql-engine: Permission denied for relation in schema public

Created on 17 May 2019  路  1Comment  路  Source: hasura/graphql-engine

During setup, I am getting a permission denied error on a table in the 'public' schema.

I have tried the following:

GRANT SELECT ON TABLE public.awsdms_ddl_audit TO hasura_role;
GRANT USAGE ON SCHEMA public TO hasura_role;

even though I do not want hasura to access public at all, just to see if that works.

and

REVOKE USAGE ON SCHEMA public FROM hasura_role;

Here is some context from the logs

CREATE TABLE hdb_catalog.hdb_query_collection\n(\n  collection_name TEXT PRIMARY KEY,\n  collection_defn JSONB NOT NULL,\n  comment TEXT NULL,\n  is_system_defined boolean default false\n);
CREATE TABLE hdb_catalog.hdb_allowlist\n(\n  collection_name TEXT UNIQUE\n    REFERENCES hdb_catalog.hdb_query_collection(collection_name)\n);
\n","prepared":false,"error":{"exec_status":"FatalError","hint":null,"message":"permission denied for relation awsdms_ddl_audit","status_code":"42501","description":null},"arguments":[]},"path":"$","error":"postgres query error","code":"unexpected"}

Why is hasura trying to access this relation at all? Please note that this is happening on Kubernetes, every time I start a new pod. hdb_catalog and hdb_views are completely empty.

Most helpful comment

This can happen when you are using AWS DMS replication on your database. Adding some permissions will fix the problem:

GRANT SELECT, DELETE, INSERT ON TABLE public.awsdms_ddl_audit TO hasura_role;
GRANT USAGE, SELECT ON SEQUENCE awsdms_ddl_audit_c_key_seq TO hasura_role;

>All comments

This can happen when you are using AWS DMS replication on your database. Adding some permissions will fix the problem:

GRANT SELECT, DELETE, INSERT ON TABLE public.awsdms_ddl_audit TO hasura_role;
GRANT USAGE, SELECT ON SEQUENCE awsdms_ddl_audit_c_key_seq TO hasura_role;
Was this page helpful?
0 / 5 - 0 ratings

Related issues

lishine picture lishine  路  3Comments

tirumaraiselvan picture tirumaraiselvan  路  3Comments

Fortidude picture Fortidude  路  3Comments

macalinao picture macalinao  路  3Comments

anisjonischkeit picture anisjonischkeit  路  3Comments