inspektor-dev / inspektor

Inspektor is a protocol-aware proxy that is used to enforce access policies👮

Home Page:https://inspektor.cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add transaction support in postgres driver

poonai opened this issue · comments

Current postgres driver, only checks incoming query is valid or not. But, it doesn't know how to act in a transaction block.

for e.g.: end user can query user but can't insert as policy.

SELECT * FROM USERS;
BEGIN;
INSERT INTO USERS(first_name, last_name) VALUES ('pooni', 'kuttypoonai');
COMMIT;

The expected behaviour is that postgres should return data for select statements and send error for insert transaction. But, Inspektor
Postgres driver return error response directly.