Skip to content

fix(postgres): harden managed-session statement policy - #275

Merged
mslipper merged 3 commits into
mainfrom
yard/block-aggregate-callback-aliases
Oct 6, 2026
Merged

mslipper merged 3 commits into
mainfrom
yard/block-aggregate-callback-aliases

Conversation

@mslipper

@mslipper mslipper commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Tightens the statement policy the Postgres proxy applies to managed sessions. The proxy now rejects a broader class of definition statements that register functions to be invoked implicitly later. This narrows what clients can define on a session whose role and settings the proxy manages.

Also updates the integration fixture and README with database-side privilege hardening recommended for the injected role.

…REGATE

An aggregate whose SFUNC is pg_catalog.set_config invokes set_config under
an attacker-chosen name, bypassing the FuncCall-based classifier and
letting a client reset the managed role or a pinned setting.
@mslipper
mslipper merged commit 7c140c8 into main Oct 6, 2026
5 of 6 checks passed
mslipper added a commit that referenced this pull request Oct 6, 2026
* fix(postgres): reject callback-binding definitions such as CREATE AGGREGATE

* test(postgres): cover aggregate alias and harden fixture grants

* test(postgres): keep fixture privileges default so tests exercise the proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant