'Roles on Snowflake - I do not want to see all databases
I want to create a role on snowflake limited only to one database and one schema and give there a read access on all tables.
I create a role, grant: grant usage on database1, grant usage on database1.schema1, grat select on all tables in database1.schema1, and I grant usage and operate on one warehouse1.
However, additionally to this I am seeing also other databases and other schemas with this role, despite no grants were added, also there is additional warehouse to warehouse1.
How I can limit access with this role and not see something that appear as default 'databases' even for roles with no grants? Regards P
Solution 1:[1]
You will be able to find out what the role can and cannot do.
Check the which users and/or roles are granted the privilege of the role: show grants of role ;
Then check what privileges were given to the role: show grants to role ;
All the users are granted the PUBLIC role. Hence, never grant any privileges to the PUBLIC role, as this simply means giving the whole world access to a database, schema and tables/views etc.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sheng |
