mitodl / ol-data-platform

Pipeline definitions for managing data flows to power analytics at MIT Open Learning
BSD 3-Clause "New" or "Revised" License
37 stars 6 forks source link

Programatically manage permissions for Trino tables #924

Closed blarghmatey closed 10 months ago

blarghmatey commented 11 months ago

User Story

Description/Context

The primary way that we share data with consumers is by granting permissions to users and roles on different tables or groupings of tables. In order to ensure that those permissions are properly managed, we want them to be defined in code. This enables code review processes, versioning, auditing, etc. By having the roles and grants in code, it also reduces any possible future migration work.

Acceptance Criteria

Plan/Design

There are two main interfaces that we have for managing these permissions.

There may be other methods that we can or should use for managing these permissions, but these are the two I am aware of from an initial investigation. Relevant documentation is available here

blarghmatey commented 11 months ago

Further conversation with the Starburst team suggests that the easiest option for this is to use the dbt grants interface to apply table permissions as part of the dbt run.