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
[Chore]: refactor object-privilege SQL into a shared GRANT/REVOKE primitive #10828
The Database CRD reconciler already manages USAGE grants on FOREIGN DATA WRAPPER and FOREIGN SERVER objects, via applyUsagePermissions in internal/management/controller/database_controller_sql.go. That helper hardcodes the USAGE privilege keyword and quotes every grantee as an identifier.
Two upcoming features need to issue GRANT/REVOKE for other privileges on other object types:
Without a refactor, each of these would duplicate the grant/revoke loop and re-implement the same edge cases. In particular, both need correct handling of the PUBLIC pseudo-role, which applyUsagePermissions does not currently provide, and REVOKE CONNECT ... FROM PUBLIC is the single most common database-hardening operation users want.
This issue covers only the preparatory, behaviour-preserving refactor. The two features build on top of it.
Activity
GRANT/REVOKEprivileges in theDatabaseCRD #10826CREATEandUSAGEgrants on database schemas #7872gbartolini commentedon Jun 3, 2026
/test
CONNECTfromPUBLICby default on managed databases #10831refactor: extract a shared GRANT/REVOKE primitive for object privileges
refactor: extract a shared GRANT/REVOKE primitive for object privileg…
refactor: extract a shared GRANT/REVOKE primitive for object privileg…
refactor: extract a shared GRANT/REVOKE primitive for object privileg…