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
fix(pgwire): scope catalog resolution and trust auth to the connecting tenant
QueryContext was constructed once per handler with a fixed tenant id (always
1), causing every SQL plan built during a session to resolve collection
metadata against tenant 1 regardless of which tenant the connecting user
belonged to.
Remove tenant_id from QueryContext / CatalogInputs construction and instead
pass it through to build_adapter() at plan time, so each plan_sql() call
uses the tenant derived from the authenticated identity on that connection.
The same hardcoded-1 pattern was present in the HTTP server, native session,
event trigger dispatcher, procedural executor, scatter-gather planner,
CDC consume path, and topic publish path — all updated to use the
tenant-free construction form.
Fix Trust-mode authentication to perform strict identity resolution rather
than silently admitting any username as a tenant-1 superuser. Implement
NoopStartupHandler::post_startup to reject unknown users with SQLSTATE 28000,
matching PostgreSQL trust-method semantics. A one-time bootstrap exception
admits and persists the first connecting user when the credential store is
empty, so fresh deployments do not require out-of-band provisioning.
Fix parse-time catalog lookup in NodeDbQueryParser to derive tenant_id from
the connecting user's pgwire metadata rather than always using tenant 1, so
Describe responses for prepared statements include field info from the correct
tenant's schema.
0 commit comments