We (Data Platform team) are reviewing how we configure and apply permissions against our data warehouse objects, and I'm curious what tools or custom systems you might be using for this.
For context our warehouse is AWS Redshift, and tools that manage db objects include both self-hosted tools with ability to hook into the execution flow and perform arbitrary work such as dbt + dagster, as well as managed/serverless tools over which we have limited control on the execution flow and logic such as Fivetran.
Our current core issue is the variety of ways permissions can be applied (direct GRANT 1-off migrations, alter default privileges, scripts that blankly re-apply grants on a fixed schedule, tools like dbt that can be configured to apply grants immediately on table (re)creation..), which generate a lot of confusion as to where and how grants need to be applied, and how to actually apply them. The end result is a permissions model where it's really complex to understand intent, users and models that on/off fail to gain access to objects they should, misconfigured pipelines, etc.
We are looking for a more sane way to configure and apply our permissions. In my mind an ideal system in a nutshell would include:
Single source of truth for defining permissions intent over all db objects (IaaC style, terraform?)
One off:
2.a. Service does continuous reconciliation of permission intent vs current state (think k8s state reconciliation)
2.b. Permission applied/revoked on deployment (think terraform) + allow systems to read the intent (eg. sql tables) and decide how and when to re-apply permissions
With such a setup, you'd effectively be able to point end-users at a single place and system to describe permissions intent (and look it up if/when there are issues), and enforcing grants it's either something noone needs to worry about (reconcile service) or it is system owners' responsibility to integrate with the source of truth to apply permissions.
I have not come across such a tool in the wild, but we would much prefer to take on / pay for some industry standard solution than build our own.
How do you yourselves handle the messy world of SQL GRANTs management?