{"id":38701,"date":"2022-10-06T06:30:51","date_gmt":"2022-10-06T10:30:51","guid":{"rendered":"https:\/\/centricconsulting.com\/?p=38701"},"modified":"2022-11-28T11:09:32","modified_gmt":"2022-11-28T16:09:32","slug":"snowflake-security-and-data-privacy-granular-access-control-with-snowflakes-advanced-features","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/snowflake-security-and-data-privacy-granular-access-control-with-snowflakes-advanced-features\/","title":{"rendered":"Snowflake Security and Data Privacy: Granular Access Control with Snowflake\u2019s Advanced Features"},"content":{"rendered":"

Keep data secure by using Snowflake security features and privacy control to determine what any given user can see based on their role.<\/h2>\n
\n

In part one<\/a> of our Snowflake Security blog series<\/a>, we discussed how to think about storing and organizing your data, from the Organization level all the way down to individual tables.<\/p>\n

Using some of Snowflake\u2019s advanced features, we can take this further and apply rules that control which specific rows and columns from a single table that a given user can see.<\/p>\n

Before we dive into leveraging specific Snowflake security features, let\u2019s first review a couple of key concepts that drive our decisions.<\/p>\n

Key Concepts<\/h2>\n

Grain \/ Granularity<\/h3>\n

In part one of our series, we discussed applying privacy and access controls at increasing levels of detail and specificity. Grain refers to the amount of detail that exists in the data itself as stored. A table with each individual sales transaction is very granular or fine-grained. A table with total spending per customer per month is less granular, and a table with total purchases per month across all customers by country is an even broader grain.<\/p>\n

Data granularity is a key nuance to consider when planning your security model. It is easy to say finance analysts at your company should not have access to credit card transaction data, but we really mean they shouldn\u2019t have access to it at the individual customer level. If you roll it up by month across all customers or by category, it may still be proprietary to your company, but it\u2019s no longer private in the same sense.<\/strong><\/p>\n

Even ignoring the security ramifications, it\u2019s important to remember data granularity when we look to correlate information from different sources and for different purposes. For example, the data we have may not be fine-grained enough: individual sales transaction data is very fine-grained but may not give us the information we need for detailed product performance analysis. For that, we might want access to each individual item purchased, not only the order information.<\/p>\n

Obviously, the finer-grained the data, the more of it there is \u2013 the more it costs to store and the slower it is to query. However, modern cloud platforms like Snowflake<\/a> make it more affordable to store large amounts of data and query it with vastly better performance, assuming it is organized properly<\/strong>. With the added ability to isolate, aggregate, tag and secure information, the industry best practice has evolved to collecting and storing all available data at the finest-possible grain, so you have it when you need it.<\/p>\n

Retention<\/h3>\n

This \u201cgrab everything\u201d bias must also acknowledge legal, regulatory and ethical practices regarding collection and retention of data \u2013 granular data that may be useful in the future may also be too \u201cexpensive\u201d to collect and hold from a legal or ethical point of view. Ideally, we will:<\/p>\n