Summary
Docs should explicitly state that PgQue's built-in roles are coarse global operational roles, not per-queue or per-tenant isolation for mutually untrusted applications sharing one database.
This is related to #96, #102, and #106, but broader as an API contract/documentation issue.
Why
Current grants and APIs are global:
pgque_reader gets select on all tables in schema pgque
pgque_writer can subscribe/receive/ack by queue and consumer names globally
- low-level primitives operate by
batch_id, queue name, consumer name
- active batch ids and payloads can be discoverable/readable by writers/readers depending on grants
Findings from rounds 2-4 show cross-app interference paths:
Suggested docs
README/reference should include a blunt note near Roles and grants:
PgQue roles are coarse database-level roles. They are intended for trusted applications/operators within the same database, not as per-queue tenant isolation. Do not grant pgque_writer to mutually untrusted apps unless you add your own schema/database isolation or future per-queue ACLs.
Also consider documenting recommended isolation patterns:
- separate databases per tenant/app
- separate PgQue installs/schemas if supported
- app-owned wrapper functions with restricted grants
- future per-queue ACL roadmap
Environment
Reviewed on main at 9b3f89f.
Summary
Docs should explicitly state that PgQue's built-in roles are coarse global operational roles, not per-queue or per-tenant isolation for mutually untrusted applications sharing one database.
This is related to #96, #102, and #106, but broader as an API contract/documentation issue.
Why
Current grants and APIs are global:
pgque_readergetsselect on all tables in schema pgquepgque_writercan subscribe/receive/ack by queue and consumer names globallybatch_id, queue name, consumer nameFindings from rounds 2-4 show cross-app interference paths:
Suggested docs
README/reference should include a blunt note near Roles and grants:
Also consider documenting recommended isolation patterns:
Environment
Reviewed on
mainat9b3f89f.