Restricting data in Quicksight by user

what are the best practices to allow end users to view data / Dashboard based in their role, location or security level on QuickSight?

Hi @daniel.mckee2 - To restrict the access on data, you can use the RLS ( Row Level Security) or CLS( Column level security) features available in QuickSight.

Please find a good blog post @Steph on the same - Row Level Security Rules in Amazon QuickSight

Regards - Sanjeeb

1 Like

I have Created a new dataset but when I go through the process “Set up row-level security” I dont see my dataset listed, I also refreshed the datasets screen but still not appearing.

Hi @daniel.mckee2 : You need to import the RLS data first and then update your data set and add RLS on top of that, can you share the screenshot if possible. In parallel, please raise a ticket to AWS Customer support team ( Link - Creating support cases and case management - AWS Support) so that with screen share they can guide to RLS set up.

Ideally RLS set up is simple and it should work.

@Ashok - Any feedback on this.

Regards - Sanjeeb

1 Like

Thanks,
this are the steps,
I have a dataset with usernames already set up on Quicksight,
I selected datasets: and I can see my new dataset with username location etc,
I open that dataset and select “Row-Level Security” > set up
User based roles selected and list of datasets are listed ( the one that our dashboard uses )
select “Apply Dataset”
but the error is as below
We can’t find a key column in this permissions dataset. Key columns must use either names (UserName, GroupName) or ARNs (UserArn, GroupArn)
is that means existing dataset that dashboard uses need to have UserName field?
thanks

Hi @daniel.mckee2 - Thanks, can you share the layout of the RLS data set, possibly a screenshot.

Regards - Sanjeeb

1 Like

UserName,Region,Segment
xxxxxxxxx,London,Startup
yyyyyyy,Surry,Enterprise
Unfortunately I cant attach any files
I have only created three columns as above
thanks

Hi @daniel.mckee2 - Thanks for the details. Couple of points, please verify.

  1. The data are case sensitive, so I assume that the UserName, Region and Segment data values are correct.
  2. The Region and Segment columns are used for filter, so please ensure those columns are part of the data set. If you want to filter on any other column for example ABC, then your RLS data will be like UserName,ABC

Please verify the above details and see whether your issue is fixed or not.

Regards - Sanjeeb

1 Like

thanks, I am looking into it now,
seems to be a little more complex then it sounds,
found you on LinkedIn

1 Like

Hi @daniel.mckee2 - Thanks, let me know if you will require any additional help. Happy to connect with you.

Have a great week ahead.

Regards - Sanjeeb

1 Like

@Sanjeeb2022 Thanks,
I haven’t been successful to complete it yet.

1 Like

Hi @daniel.mckee2

Have you gone through this document?

And are you seeing no data or all data still?

Hi Max,
I did go through that document, what I am not sure of is when I have 3 columns on my new query ie UserName,Region,Segment
should I have exact columns on my main dataset/ query ( the one I want to apply the RLS to main query has 10 columns like, date, region etc but not Username or Segment) too?
thanks

Yes they need to be the exact. Username is only on the users dataset. But your two tables need to have the exact same column name.

Dataset 1(users) → Dataset 2 (visuals)
UserName,Region,Segment → Region,Segment,etc…

Brilliant thanks ,
Is there a way in QuickSight to create a computed columns to add new fields, ie I want to create the new fields ( to match RLS query) in my main dataset without going back to database, so in my main dataset which has 10 columns , date, region, etc , I want to add the three columns I have on my RLS query so it can match ?
thanks

I don’t see a way to do this without altering your SQL or if your doing select * then you would need to update one of your tables / views anyways.

Plus to add any new fields you need to publish the dataset anyways. So I don’t think it could necessarily be automatic.

Thanks Max, I understand that ,
I was wandering if there is a way to create computed column ( in Quicksight ) where one can add new fields to the datasets.
because this is a test I thought not changing DB .thanks

Oh I see.

Yes you can add calculated fields to a dataset. I’m not 100% sure that they will be able to be used in RLS but you can try.

1 Like

thanks Max, will test it

1 Like