You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SECURITY] Prevent user DDL from dropping StackQL control and unmanaged tables #823
Current-build pgwire probe: DROP TABLE "__iql__.control.generation" succeeded against a disposable backend. A subsequent sqlite_master query confirmed the control table was gone. This required neither NATIVEQUERY for the deletion nor a SQL quoting breakout. New sessions then failed in the first reproduction because required control state was missing.
Required outcome
Restrict user DDL to catalog-managed user relations and protect internal/control/cache namespaces across DROP TABLE, DROP MATERIALIZED VIEW and replacement paths.
Validate before deleting catalog rows or physical objects; retain transaction consistency on failure.
Keep general per-client authorization separate from this engine invariant.
Validation and acceptance
Robot tests should attempt internal and unmanaged table drops without NATIVEQUERY, assert refusal and continued server liveness, and verify legitimate user table/materialized-view operations still work. Cover both backends, qualified/quoted names and CREATE OR REPLACE paths.
Scope and related work
#799 covers PURGE destroying user data; reuse that issue for purge semantics. #312 covers RBAC and shared view ownership. This issue specifically prevents ordinary DDL from deleting engine-owned relations.
Activity