sql server - grant read access on a view but not on it's underlying tables from other databases -


i want grant read permissions user view joins 2 tables database. i don't want to:

  1. give him permission on database tables or add him user there.
  2. make him owner of view/schema due security exploits.
  3. i don't want create first table, or variations of hack table truncate , stored procedure inserts data on trigger.

can done somehow? maybe there's missed , guys might know.

i have read these posts didn't solve problem: grant select permission on view, not on underlying objects

grant select on view not base table when base table in different database

https://msdn.microsoft.com/en-us/library/ms188676.aspx

https://dba.stackexchange.com/questions/89632/sql-server-grant-select-access-to-a-user-in-a-view-and-not-in-its-tables

thank you

edit: easiest solution came with, after research, activating cross database ownership chainingoption on database i'm placing views , granting read permission users. might in contrast 2nd point of things i'm trying avoid. idea?

give them login database on same server, , include single view, view pointing secure database. don't give login access database view in it, , read access single view. obviously, you'll have qualify table name (e.g., from sourcedb.dbo.somesecrettable).


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -