Commit Graph
3 Commits
Author SHA1 Message Date
Gavin Frazar 0bcabee6b4 Fix database user auto-provisioning (#51945)
* Use a custom query to find user db privileges on tables to avoid the
  "grantor" filter condition in the information_schema.tables_privileges
  view. This fixes the cases where the grantor for a privilege is set to
  the table owner rather than the user (teleport) who issued the grant.
  Most notably, this happens when a superuser grants privileges on a
  table they do not own to a user.
* Grant USAGE on schemas that contain tables where we intend to grant
  table privileges. This is necessary to use the table privileges we
  grant.
* Wrap all remaining plpgsql procedure creation/calls with retries.
* Add a db permissions e2e test for RDS
* Expand e2e tests to test with and without a superuser db admin
* Significantly speed up the RDS e2e tests by wrapping EventuallyWithT
  in a helper func that tries the condition func immediately rather than
  waiting for the first tick duration.
2025-02-12 02:51:33 +00:00
Krzysztof Skrzętnicki 26736198a5 Properly coalesce null table list into empty array. (#42961) 2024-06-20 13:41:26 +00:00
Krzysztof Skrzętnicki d6915c8dea Implement granular db permissions for Postgres (RFD 151) (#37808)
* Implement granular db permissions for Postgres (RFD 151)

* docs, whitespace

* Make sure query is closed, even in case of errors along the way

* fix imports
2024-03-04 19:28:22 +00:00