metabase icon indicating copy to clipboard operation
metabase copied to clipboard

fine grained use permissions, for e.g. seeing sensitive columns

Open snarfed opened this issue 11 years ago • 22 comments

we'd like to expose "sensitive information" columns (e.g. PHI) to some users but not all.

i know the users and permissions model (or at least admin screen) is changing somewhat in 0.12. feel free to close this if it's already done!

snarfed avatar Oct 07 '15 21:10 snarfed

@camsaul One could associate a role with a user account, and pass role down to the database. This way permissions and authorization would not be a metabase problem, while an admin could apply restrictions to data at the database level. Postgrest passes the problem down to the database as well.

Jacob-Kroeze avatar Mar 10 '16 00:03 Jacob-Kroeze

Handling the roles and respective permissions for each role in metabase would be better. It makes the roles database agnostic.

In my opinion, this is just the most important issue in metabase. Would be awesome to have in milestone 0.16

MrMauricioLeite avatar Mar 10 '16 13:03 MrMauricioLeite

I'm really happy with the roles setup used in Pentaho web platform (open source, you can take a look) and inspired by them I'll give some sugestions:

Admin roles Add a screen or form that list, add and delete roles. Those work just like label for users that we can use to whitelist or blacklist later.

Inside people screen in each row a select that show all the existent roles that we can associate to this person, with the possibility to select one or more roles for the same user.

Questions and dashboards When creating new questions or dashboards, in the saving screen, the User could save it as 'private', 'visible to all users with: (list his roles here)' or 'public'. May be like the google drive sharing screen, where people are added with edit or read permission but only with the roles this user have. If the user is an admin, you can list all roles available.

Datamodel In the datamodel, a Admin can set a table visibility by adding roles to the 'can view' (just like folders in Pentaho web platform or in the same google drive sharing ). Whe it comes to columns in a table, the user can negativate fields by roles to in a 'all table roles except: ...' fashion.

Obviously this is just a suggestion, fell free to ignore my comment. =) But I really think this is easy for users to learn and would come in handy.

MrMauricioLeite avatar Mar 10 '16 13:03 MrMauricioLeite

+1 @MrMauricioLeite

Questions and dashboards When creating new questions or dashboards, in the saving screen, the User could save it as 'private', 'visible to all users with: (list his roles here)' or 'public'. May be like the google drive sharing screen, where people are added with edit or read permission but only with the roles this user have. If the user is an admin, you can list all roles available.

As a potential user reviewing my options, I would really like to see the above suggestion about 'Questions and dashboards' become a reality. I have a use case where it's really important to be able to put users into role groups and give them specific dashboard viewing/editing permissions. Essentially, I'd like to use a Metabase account to allow multiple organizations to analyze the same datasets, but keep their questions and dashboards private.

cjcrow avatar Mar 28 '16 14:03 cjcrow

What I think that is the most important thing here is to start using some sort of permissions-setup ASAP. Cause this kind of stuff usually mature with time and have a significant impact for who is going to use Metabase.

Is there any planning on when this kind of stuff gets into the roadmap? Maybe 0.17.0?

I'll make sure to start contributing with some code for is as soon as I learn a little bit more of the source code. Hold on to your hats. :smile:

MrMauricioLeite avatar Mar 28 '16 23:03 MrMauricioLeite

@MrMauricioLeite That would be great, we'd love the help. Please read https://github.com/metabase/metabase/blob/master/docs/contributing.md in the meantime.

salsakran avatar Mar 28 '16 23:03 salsakran

So the deal with permissions is that we've tried to hold off on adding a permissions system.

We've intentionally tried to build a simple, easy to use BI solution for small, relatively homogenous teams. The intent is to move the core product forward as fast as possible, optimize for small teams and learn as much as we can about where our user base is going. Will people be using LDAP? Google Auth or some other Single Sign On? Will the product be used company wide? Will there be dedicated admins?

We are also actively trying to avoid a gnarly, complicated permissions system that is front and center in both the user and admin worlds, and want to get it right.

Please use this issue to tell us:

  • How many people are using Metabase at your company
  • How many distinct groups (in terms of permissions) they are made up of
  • What level of permission/access control you're looking for (dashboard level, DB level, Row level, column level etc).

And if you're thinking about using MB but can't because of a hard requirement for a specific permissions scheme, definitely let us know that.

salsakran avatar Mar 28 '16 23:03 salsakran

How many people are using Metabase at your company

We are a startup growing pretty fast and currently have 7 people looking at our dashboards. As we add more people the permissions stuff will be come a big issue.

How many distinct groups (in terms of permissions) they are made up of

  • Sales & marketing: Those permissions are pretty broad... almost anyone in the company can see these.
  • Business KPI's: Stuff that may involve revenues, we don't want lots of people to know these numbers.
  • Some proprietary marketing analytics: very few people will see these numbers.

What level of permission/access control you're looking for (dashboard level, DB level, Row level, column level etc).

DB level is good enough. If I need column/row level, I would probably create a database "view" or ETL stuff into a different table where the sensitive stuff isn't there. Or use https://github.com/metabase/metabase/issues/1822 if it ever gets in :).

Dashboard level would probably be good too, but really, if you block DB level then stuff they shouldn't see in a dashboard wouldn't show. But dashboard permissions would be easy from a coding standpoint since its just page permissions.

that0n3guy avatar Apr 11 '16 14:04 that0n3guy

@MrMauricioLeite Hey, have you been able to get hold of the source code flow? I would like to help too to enhance this feature.

activatedgeek avatar Apr 12 '16 14:04 activatedgeek

Hi guys, I'll try to provide some feedback on this issue:

How many people are using Metabase at your company

Here I'm about to deploy with a small dataset for something around 200 users amoung our e-commerce. I'll just open a small dataset from our datawarehouse due to no permission control. So I don't want the warehouse team reading data from the Finance or from Legal team

How many distinct groups (in terms of permissions) they are made up of

I think that about 6 groups of permissions. If the role system is implemented, we would have something like: admin, commercial, marketing, finance, warehouse, transports and a public role (if needed)

What level of permission/access control you're looking for (dashboard level, DB level, Row level, column level etc).

First of all, in the permissions for data, i think that granting permissions on a table level would be good enough. We would just use the virtual tables or view from our datawarehouse and limit the data available by that. For sure if you have a row level permission on your roadmap (someday, even if 1 year from here) it would be awesome for sure, but not required.

On the questions interface though it would be better to have a dashboard / question level cause our finance team would be able to open one recurrent question has public or to a especific role (as suggested above) and the dashboard permission level would show questions even if the user don't have permission to see the question alone, but only on the dashboard.

Hey @activatedgeek, I actually haven't got my hands on the code yet. Some other projects took my attention here on my day-job but if you start developing it I'll try to help for sure. Go for it man!

MrMauricioLeite avatar Apr 12 '16 15:04 MrMauricioLeite

I can provide some more detail here as well, but my use case is very similar to @MrMauricioLeite.

We have about 150 employees, not all of which will be using metabase, but there will likely be a userbase around 20-30 folks across at least 3-4 different groups. This number may grow if adoption of metabase is strong.

Table or DB level would be fine in terms of granularity. I'm currently considering different databases depending on the use case, but haven't settled on that yet.

dacort avatar May 02 '16 23:05 dacort

Here are some details about our usage:

How many people are using Metabase at your company

Currently we have about 10 people with access. However, we'd like to be able to share the visualizations with a lot more people (company size is ~100) without necessarily giving access to run arbitrary queries.

How many distinct groups (in terms of permissions) they are made up of

At this point in our usage, having "writers", "readers", and "admins" would be sufficient. Most people just need to look at the existing questions, a handful need to create new questions, and a select few need to administer the application. Certainly at some point people are going to want more fine grained control over which questions can be seen by which people. However, I have to say that, coming from enterprise software with obnoxious levels of permission customization, the simplicity and easy of use of Metabase is very refreshing.

What level of permission/access control you're looking for (dashboard level, DB level, Row level, column level etc).

Mainly restricting the types of things that people can do (i.e. write their own questions). Dashboard/question level would be nice to have, but that could be an additional layer (users are placed in groups, groups are granted access to dashboards and questions, etc.).

computersarehard avatar May 20 '16 18:05 computersarehard

How many people are using Metabase at your company

We are currently investigating if Metabase suits our needs. In the future, 3-5 developers, 10-30 company users and 50-100 clients

How many distinct groups (in terms of permissions) they are made up of

3 - IT with full Admin, Sales/Design with read and write and Clients with read only.

What level of permission/access control you're looking for (dashboard level, DB level, Row level, column level etc).

Dashboard level: Clients should only be able to see questions and dashboards that are marked visible to them, whereas Sales/Research could see every question and dash.

spaasis avatar May 25 '16 10:05 spaasis

Another +1 from @cagiraudo in #2949

kdoh avatar Jul 13 '16 17:07 kdoh

This feature would be very helpful for us too. We are using Metabase to provide data and visualizations for our clients. What we are doing now is deploying an instance of Metabase per client, which is not that scalable.

Each instance in our case has 1 or 2 admin users and 2-3 client users (probably used by more people). Per database or per table permissions would do the task for us.

@idontdomath

gseva avatar Jul 19 '16 15:07 gseva

Ours is a company of 30-50. Some things (like very specific revenue tables) are not appropriate to share across the company. I think others have pretty well defined my ideal world:

  • Three classes of accounts
    • Reader
    • Writer
    • Admin
  • Labels / roles that can be applied to each account (along with a default for SSO generated accounts)
    • Expose questions / dashboards based on labels/roles

In this world, a Reader would not be able to even see table structures (or generate queries). Writers basically have access to run all queries, but can't modify the permissions of other people, etc.

The vast majority of the people in our office would consume data (be Readers), with only a select few that actually meddle around with composing queries themselves. Customer service reps should be able to see information relevant to them, but they are not really well equipped to crawl through the database by themselves.

sturgill avatar Aug 08 '16 16:08 sturgill

This is a feature that would tremendously extend the benefit that Metabase can bring to our organization.

How many people are using Metabase at your company?

3, however if we can get the permission on the dashboard level we will open to around 50.

How many distinct groups (in terms of permissions) they are made up of?

Around 20, which each one is a different physical branch. Right now, only management has dashboards with overall performance of all branches. We prefer to not let other branches see each others numbers, hence the need for permissions at the dashboard level. Also, once we open beyond management and a bigger number of users, we want them to have read-only access.

What level of permission/access control you're looking for (dashboard level, DB level, Row level, column level etc).

My use case wouldn't need more granular then dashboard level.

ravelantunes avatar Sep 13 '16 03:09 ravelantunes

Hi @ravelantunes, we're working on shipping permission groups/roles for databases, schemas, and tables (issue #3087) as part of our next release. We're planning on extending that to columns, cards, and dashboards in releases after that 👍

camsaul avatar Sep 13 '16 19:09 camsaul

this is going to be rolled into our tracking issue for stage 2 of permissions - #3363

salsakran avatar Sep 16 '16 00:09 salsakran

@salsakran if this is going to be rolled into #3363 should we close this in favor of that?

camsaul avatar Sep 19 '16 19:09 camsaul