402 questions
0
votes
0
answers
19
views
I can't delete an entry from table using SvelteKit & Supabase. Row-Level Security
I'm working on the delete functionality for my SvelteKit app with Supabase integration. The issue I'm facing is that I can only delete an entry when RLS (Row Level Security) is disabled. When RLS is ...
0
votes
1
answer
25
views
Postgres create policy concurrently
I have a postgres table already has row level security enabled, with policy for role1. I want to create another policy for role2. However, when I run
CREATE POLICY policy_name ON {table} AS PERMISSIVE ...
0
votes
0
answers
24
views
Highlight a row in a table when using RLS
I have a report on retail store performance. It uses RLS on tables [Store] and [Sales] so each store accessing the report only sees their data. However, I also show a league table of all stores based ...
2
votes
1
answer
90
views
Postgres Permissions violated by before-insert trigger function
I've got a table with row level permissions enabled. I've got an insert policy for my user, and I've granted permissions for them on specific columns. I added a new column to track the id of whoever ...
0
votes
0
answers
76
views
Why using a different table for user role in Supabase Auth?
I have a hard time understanding why we need a new table that maps the users registered using Supabase built-in Auth with their role and then uses RLS according to the roles in that table.
From what I ...
0
votes
1
answer
126
views
How to get error reporting for Supabase RLS violations?
I am using Supabase's RLS to control which users can delete certain records in the database. The records are associated with files in a bucket that will get deleted too. I expect that if the Supabase ...
1
vote
1
answer
91
views
Apply RLS to a calculated table
I have the following calculated table :
MyCalculatedTable =
DISTINCT (
SELECTCOLUMNS (
FILTER (
'Dim A',
LEFT('Dim A'[Group],1) = "B" &&
...
1
vote
1
answer
52
views
Prevent self-referencing relation in SurrealDB
I am trying to apply the table permissions system SurrealDB offers to enable row-level security in its tables, but am seeming to fail with a simple example:
DEFINE TABLE node SCHEMAFULL TYPE NORMAL;
...
0
votes
0
answers
80
views
How to set RLS on Power BI dataset dependent on the report the dataset is used for?
I have a semantic model (also called a dataset) in Power BI which I have multiple Power BI reports connected to. One of the columns in the dataset is [employee_username] in the table [employees]. This ...
0
votes
0
answers
118
views
How to Hide Filters Based on Row-Level Security (RLS) in Apache Superset 4.0?
I'm using Apache Superset 4.0 and have implemented Role-Based Access Control (RBAC) and Row-Level Security (RLS) to manage data access for different user roles. However, I want to hide specific ...
0
votes
0
answers
57
views
RLS not working correctly with Google oAuth / supabase
With nextjs I have a google OAuth login with supabase and I want to have specific users to be able to insert, update, delete files. So I've given certain users the role 'service_role' and have added ...
1
vote
0
answers
77
views
Row-level security with session_context doesn't work after refreshing token
I have a multi-tenant database, I use Row-level security to filter/block data for every table. Every time someone queries the table, they need to set up the session context. I have a API set up where ...
0
votes
1
answer
208
views
How to apply RLS to other dimensions when using the static RLS approach?
I have 4 tables. Sales, Customers, Products, Brand. The data model is a standard star schema design.
There are 3 Customers in the Customers table, for example: Walmart, Starbucks, Kellogs.
Customer's ...
0
votes
1
answer
325
views
Postgres with row level security does not optimize queries / uses one-time filters
It seems that postgres with enabled row level security on a table cannot properly optimize queries. The following example sql demonstrates the issue:
begin transaction;
-- create demo table
...
0
votes
2
answers
75
views
Row level security policy not working when checking the same table
I have two users: alice and bob.
I have one organization: contoso.
Alice is member of contoso.
What I want is for alice to be able to add bob as member of contoso since alice is member of contoso. I ...
0
votes
0
answers
57
views
User cannot query Bigtable with BigQuery Filtered Data Viewer permissions
I have a dataset in bigquery that has row level access policies that restrict access based on an account id. In order to link a user to an account ID, I add a specific row level access policy.
The ...
0
votes
0
answers
32
views
Need a PostgreSQL RLS policy for employees to see posts
I am using Supabase and PostgreSQL and have a number of tables as below:
Table 1: user_roles:: id, created_at, user_id, role_id
Table 2: roles:: id, created_at, role_name
id 1 >> admin
id 2 >...
1
vote
0
answers
129
views
How to assign a default security row for RLS in Power BI workspaces?
I have a power BI dataset that I'm looking to give access to a large population of the company. I don't want to have to go through and assign every person to a security role through the GUI. Is there ...
1
vote
1
answer
69
views
In Azure Data Explorer how do I parametrize metadata to be used in Row Level Security function in a query optimized way
My timeseries table T has the columns: location, sensor_id, timestamp and value. The table has thousands of sensor_id, billions of values per year and about 100 locations. The 100 locations are in 6 ...
1
vote
0
answers
14
views
Exporting Power BI Row-Level Security Details by Workspace
Is there a way to export the RLS configured on semantic models by workspace?
I only found this tutorial : https://www.fourmoo.com/2022/06/22/how-to-get-power-bi-row-level-security-rls-role-users-...
0
votes
0
answers
56
views
PowerBI: Row Level Security with not all users in Table
I have a question regarding RLS. I have a table which I want to use the RLS on for an APP in Power BI and I do not want to create more than 1 role but instead have 1 Role manage all users. The issue ...
0
votes
1
answer
283
views
Row-level security in SQL server
In this scenario, I seek assistance in implementing row-level permissions for a table named 'user' with columns 'username' and 'role'. The objective is to establish a security model where access to ...
1
vote
0
answers
243
views
How do I use Supabase Realtime database with RLS and a custom JWT?
I am having trouble getting realtime data from my Supabase database when using Row level security (RLS) and a custom JWT.
When getting data from the database normally things work as expected, but when ...
1
vote
0
answers
232
views
Row level security on select statement to select multiple rows from two tables
I have only used Postgres briefly, so still trying to learn.
I have 3 tables, "users", "teams" and then to connect users to multiple teams "users_teams".
users
...
0
votes
0
answers
46
views
Implementing Row Level Security with Dynamic Permissions in Supabase for Role Management
Imagine two tables:
Website
name
type
id
int
Website Contributor
name
type
description
account_id
uuid
FK to supabase's authenticated users table; auth.uid()
website_id
int
FK to website
role
...
0
votes
1
answer
158
views
Design Row level access in a Azure SQL database
I have a requirement to create new SQL database with close to around 10 tables including all fact and dimention tables. This database stores the data for several users from several partner companies.
...
0
votes
0
answers
62
views
Why am I getting seq scan with RLS but not with equivalent query? Hierarchical data, filtering on user + relatives
I'm working with an architecture where users have hierarchical relationships. User100 could have a parent of User50 and a grandparent of User1. User100 would need to be able to see records owned by ...
2
votes
1
answer
195
views
DAX RLS Function using LOOKUPVALUE Parsing but not working
I have a table that I'm trying to implement RLS on using a secondary table with a structure below:
EmployeeTable
EmployeeID
EmployeeEmail
1
[email protected]
2
[email protected]
FilterTable
EmployeeID
...
0
votes
0
answers
66
views
How to Implement Row-Level Security in Tableau?
I am attempting to implement row level security in a Tableau workbook, but I have very specific conditions for it. I have five teams (A, B, C, D, and E), each with multiple users, though each user can ...
0
votes
2
answers
230
views
Snowflake: how to securely share Snowsight worksheets & dashboards for data with row-level security
What would be the best way to enable users to share Snowsight worksheets & dashboards for data with row-level security/row access policies?
It seems like sharing a worksheet would be dangerous ...
2
votes
0
answers
41
views
Get embedded url of pbix power bi report that has paginated rdl report inside it
When I get the embedded url of pbix report that has the paginated rdl report in it and load it in an iframe the pbix report is visible but the paginated report is not show. The paginated report has ...
2
votes
1
answer
1k
views
Power BI Embedded with Row-Level Security
I want to demonstrate to a client how you can embed a report in a custom web application using Power BI Embedded with row-level security (RLS). The client wants to share a report with users outside ...
0
votes
1
answer
58
views
What happens to RLS when join tables (Bigquery)
I use Bigquery to query data and RLS has been implemented to my tables.
I created a table and joined 2 different tables, with respectively C1 and C2 security : how the RLS is handled with a joined ...
0
votes
0
answers
92
views
Unable to set RLS in Power BI based on another table
I have the following two tables relevant to RLS:
DIM_EMPLOYEE (EMAIL, BRANCH_ID)
and
DIM_BRANCH (BRANCH_ID)
There is a one-to-many relationship from DIM_BRANCH to DIM_EMPLOYEE (i.e. filters cascade ...
1
vote
1
answer
163
views
Two Separate Row Level Security Rules for 1 Role
In setting up Row level security, I am trying to have two filters, each for a separate table, for one role. Currently, I have two tables: Projects (listing all projects, owners, location and start/end ...
0
votes
0
answers
85
views
Row Level Security in Bigquery
I am trying to create row level security policy in Bigqeuery
CREATE OR REPLACE ROW ACCESS POLICY policy_name
ON `sample_project.sample_dataset.sample_table`
GRANT TO ('allAuthenticatedUsers')
FILTER ...
0
votes
0
answers
60
views
Measure results disappear when row level security is applied in Power BI
I inherited a report that calculates commission totals for sales reps. After updating the calculations within the measures to this year’s goals we went to test the row level security to find the ...
0
votes
1
answer
436
views
Force row level security in postgres
I want to enforce Row-Level Security (RLS) for PostgreSQL with Row Security Policies for ALL users including admins and table owners:
ALTER ROLE postgres WITH NOBYPASSRLS; -- enforce for the superuser
...
0
votes
0
answers
119
views
supabase postgress roles error in flutter
in supabase
after creating role 'adminRole'
then granting the role to an email through
update auth.users set role = 'adminRole' where email='my email';
i checked the table and it did update.
then ...
1
vote
0
answers
91
views
Proper way to query table for RLS
I'm sure this is a common question but I cannot find the answer. I want to query a separate table called users and check if they have property is_moderator = true.
(EXISTS ( SELECT 1
FROM users
...
0
votes
1
answer
144
views
Bigquery tables get data API returning Access Denied
Not able to get the BQ get table data API work with row level policies.
Trying to make a HTTP API call to:
https://bigquery.googleapis.com/bigquery/v2/projects/<project-name>/datasets/<...
0
votes
1
answer
344
views
RLS - Custom "No access" message (Power BI)
Upon setting a RLS filter, users get a blank space if the info contained by the visual (drilled-down table) is not meant for them to see; however, I would like it to display a "No access" ...
0
votes
1
answer
311
views
supabase database functions and RLS
I am using supabase and i am trying to accomplish one thing.
I have a table called "customers", and it's like this:
customer_id, first_name, last_name,....., profile_id (from the profile ...
0
votes
0
answers
39
views
implementing RLS policy based on criteria (country, organization) in users table
I am creating a web-based regional groundwater information system where information and users are from different countries. While anyone can look at the data, the system should only allow those users ...
0
votes
1
answer
190
views
SSAS/Power BI Row Level Security
I have been using some very useful articles created by radacad (e.g. https://radacad.com/dynamic-row-level-security-with-manager-level-access-in-power-bi) to enable me to add some row level security ...
3
votes
0
answers
241
views
the right place to SET a session variable when using gorm with row level security for postgresql
We are trying to find the go / gorm equivalent of the following snippet of java code
// Every time the app asks the data source for a connection
// set the PostgreSQL session variable to the current ...
1
vote
1
answer
864
views
supabase / PostgreSQL RLS Rule leads to "infinite recursion detected in policy for relation \"profiles\""
I am currently familiarizing myself with Supabase and Postgres and RLS-Rules. But these rules lead to an error: response 400 "infinite recursion detected in policy for relation "profiles&...
2
votes
0
answers
162
views
Why is my query so much slower with a `security_barrier` view, even without row-level policy?
I am developing an application where I want to make use of the builtin row-level security in Postgresql. To make sure my views also respect it, I enabled the security_barrier and security_invoker ...
1
vote
1
answer
864
views
can't enable row level security using sqlalchemy engine
I have my sqlalchemy engine setup as such:
DATABASE_URL = (
f"postgresql://postgres:{PG_PASS}@db.blabla.supabase.co:5432/postgres"
)
engine = create_engine(DATABASE_URL)
And I use the ...
0
votes
1
answer
288
views
Row Level Security with Common Table Expression
Given this schema:
CREATE TABLE posts (
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
title text NOT NULL CHECK (char_length(title) > 2),
author uuid NOT NULL DEFAULT auth.uid() ...