pgstac
pgstac copied to clipboard
`pgstac_read` role does not have read access to `collections` table
According to https://stac-utils.github.io/pgstac/pgstac/#pgstac-users:
The pgstac_read role has read only access to the items and collections, but will still be able to write to the logging tables.
However, when I run the following query:
select * from information_schema.table_privileges where grantee='pgstac_read';
It appears that the pgstac_read user only has the SELECT privilege for all of the _items_* tables, but not the collections table. This results in a permissions denied error when attempting to query the /collections/* endpoints via the API.
After granting the appropriate permissions with:
GRANT SELECT ON pgstac.collections TO pgstac_read;
The /collections/* endpoints can now be queried successfully.