electric-sql / electric-sql/electric

Allow Electric to run with restricted privileges

Open
#2,468 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.4k
Forks
375
Avg merge
3d 1h
Merged PRs (30d)
18

Description

Electric currently requires a Postgres user with elevated privileges to create shapes on-demand. This high-privilege requirement might be a risks in production environments where the entire database cannot be exposed to Electric.

We want to modify Electric to be able to run with a smaller set of privileges. When a shape creation is requested for a table that hasn't been explicitly exposed in the replication publication, Electric should return a benign error message rather than failing with an exception (if that is the case now.

1. We want to identify and document the minimal set of privileges required for the Electric Postgres user
2. Implement error handling when shape creation fails due to insufficient privileges
3. Document any requirements for exposed shapes to perform well (like setting filters, or replica identity in case we need any special privileges for that)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.