feat(postgres): add native read-only mode with RBAC startup verification - #4051
anubhav756 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a readOnly configuration option for the PostgreSQL source, implementing startup checks to verify that the connected user does not possess superuser, table write, or schema creation privileges, and blocking the simple protocol to prevent statement chaining. Feedback suggests improving the robustness of the permission verification query by using has_table_privilege against pg_class to correctly handle table ownership, role inheritance, and public grants. Additionally, it is recommended to enforce read-only mode at the connection level by setting default_transaction_read_only = on in the connection parameters for defense-in-depth.
06bf3d4 to
54d2179
Compare
54d2179 to
0c9a371
Compare
|
The verify query in PG 17.11 and 15.19:
Also f,f,f on PG17, yet able to write: Adding Are column grants and NOINHERIT in scope? Does 3 change the |
No description provided.