stac-utils / stac-utils/pgstac
`pgstac_ingest` role does not allow access to the `POST /collections` API endpoint
Nobody has claimed this yet.
- Dominant language
- PLpgSQL
- Stars
- 223
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
According to https://stac-utils.github.io/pgstac/pgstac/#pgstac-users:
The pgstac_ingest role has read/write priviliges on all tables and should be used for data ingest or if using the transactions extension with stac-fastapi-pgstac.
However, when running the STAC API with the Transactions extension enabled, connecting to the database as the pgstac_ingest role, an attempt to create a collection via the POST /collections endpoint fails with:
asyncpg.exceptions.InsufficientPrivilegeError: must be owner of table partitions
The owner of the partitions table is pgstac_admin, as expected. So it would appear that the pgstac_ingest role does not actually allow access to all of the Transactions endpoints?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the POST /collections request with the Transactions extension enabled while connected as pgstac_ingest, then inspect the role privileges and ownership of the partitions table. Done means pgstac_ingest can create a collection through that endpoint without the InsufficientPrivilegeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- api, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100