question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Row Level Security filter wildcard for all tables and multiple table filters

See original GitHub issue

Case

As we work closely with Superset and the new Row Level Security feature we soon came to the situation in which we have pretty much the same filters for multiple tables. And the amount of the filters is growing constantly. So, it becomes difficult to manage all these filters in the current RowLevelSecurityView.

Also, there is a security case when the user have a filter constraint on a certain table and an additional sqllab_view table is being created. So the user will be able to see unauthorised data. And the 1st solution below will solve this one too.

Suggestion

As now we have only per table filters we propose to implement some kind of all table filters and multiple table filters.

Possible solutions

  1. We can make the table_id column of the row_level_security_filters table nullable. And null will stand for asterisk (apply the filter to all tables). The solution currently fits all our requirements.
  2. As a development of the 1st idea we can introduce a new table called, for example, rls_filter_tables. It will represent the relation between rls_filter_id and table_id pretty much the same as we have for role-filter relations in the rls_filter_roles.
id | table_id | rls_filter_id
 1 |        5 |             1
 2 |        6 |             1

Outcomes

This way we can re-use existing filters for other tables and preserve space and readability on the RowLevelSecurityView page.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
villebrocommented, Apr 20, 2020

Hey @axelet thanks for the ping! Will put a post-it on my desk to remember to review asap!

0reactions
stale[bot]commented, Jul 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Row Level Security filter wildcard for all tables and multiple ...
As now we have only per table filters we propose to implement some kind of all table filters and multiple table filters. Possible...
Read more >
Row-level security (RLS) guidance in Power BI Desktop
Guidance for enforcing row-level security (RLS) in your data models with Power BI ... It's important to understand RLS filters table rows.
Read more >
Data filters in Lake Formation - AWS Documentation
When you specify the "all columns" wildcard and provide a row filter expression, you are establishing row-level security (row filtering) only.
Read more >
Introduction to BigQuery row-level security - Google Cloud
Row -level security lets you filter data and enables access to specific rows in a table based on ... One table can have...
Read more >
Role Level Security on Multiple Tables
I need the filters to be an 'or' filter, meaning that I need all from both sections. For example, say I have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found