What you will be able to do
- Describe Snowflake's four-level key hierarchy and what key rotation and periodic rekeying do
- Explain what Tri-Secret Secure adds, and the risk of revoking the customer-managed key
- Tell Trust Center violations from detections and match Trust Center application roles to tasks
- Build an alert from a condition, an action and a schedule, and deliver it through a notification integration
- Trace upstream and downstream data lineage in Snowsight and with GET_LINEAGE
1.Encryption key hierarchy, rotation and rekeying
Policies decide who may read data. Encryption protects the data itself, and Snowflake encrypts all customer data by default with AES, using a hierarchical key model that needs no configuration. In the hierarchy, each parent key encrypts (wraps) the keys below it, so every key protects a limited amount of data for a limited time.
| Key level | What it protects |
|---|---|
| Root key | Stored in a cloud-hosted hardware security module (HSM). On Google Cloud, created and stored through Cloud KMS |
| Account master key | One account's hierarchy. Separate account master keys isolate each account in the multi-tenant service |
| Table master key | A single table |
| File key | A single file |
Key rotation happens automatically once a key is more than 30 days old. The active key is retired and a new, random active key takes its place. From then on, the new key encrypts all newly inserted rows. The retired key only decrypts the data it encrypted earlier: April's key reads April's data, and May's rows use May's key. Once Snowflake no longer needs a retired key, it destroys it, and a destroyed key is never used again.
Periodic rekeying finishes the key lifecycle. With rekeying on, once a table's retired key is a year old, Snowflake creates a new key, re-encrypts the data the old key protected, and destroys the old key. Rekeying runs online in the background, with no downtime and no performance impact on running workloads. That is possible because storage is separate from compute. Time Travel and Fail-safe retention are unchanged, but the rekeyed files incur 7 days of extra Fail-safe storage charges. On Enterprise Edition accounts, ACCOUNTADMIN enables rekeying:
ALTER ACCOUNT SET PERIODIC_DATA_REKEYING = TRUE;Checkpoint 1 of 5· Check yourself
A reviewer says: "We already have masking and row access policies on our sensitive tables, so the stored data is protected. Encryption doesn't add anything." What is wrong with this reasoning?
Masking and row access policies are evaluated when a query runs and never change the stored values. They decide who may read data. Encryption is a separate layer that protects the data itself, and Snowflake applies it to all customer data by default, whether or not a policy is set.
“sensitive data in Snowflake is not modified in an existing table (i.e. no static masking)”Source: docs.snowflake.com
Sources1
2.Tri-Secret Secure and customer-managed keys
Tri-Secret Secure combines a Snowflake-maintained key with a customer-managed key (CMK) that you create in the key management service of the cloud platform hosting your account. Together they form a composite master key, which acts as the account master key and wraps every key below it. It never encrypts raw data directly. The third secret is Snowflake's own user authentication.
The control works in both directions. Revoke the CMK and Snowflake can no longer decrypt your data, so keeping the key safe becomes your job. Self-service setup takes these steps:
- Register the key with
SYSTEM$REGISTER_CMK_INFO. - Authorize Snowflake on the cloud provider using the output of
SYSTEM$GET_CMK_CONFIG. - Confirm connectivity with
SYSTEM$VERIFY_CMK_INFO. - Wait at least 72 hours after registering, then activate with
SYSTEM$ACTIVATE_CMK_INFO.
Activation starts a rekey that usually finishes within an hour and can take up to 24 hours, and the account stays usable throughout. Snowflake keeps using the old CMK until the rekey completes, so do not remove access to it before the completion email arrives.
Checkpoint 2 of 5· Check yourself
You have just replaced the CMK on a Tri-Secret Secure account by activating a new key. The old key's access policy in your cloud KMS is still in place. When is it safe to remove it?
Activation starts a rekey that can take up to 24 hours. Until it completes, Snowflake still uses the old CMK, so removing access early would leave the account unable to decrypt data.
“Snowflake uses the old CMK until the rekeying process completes.”Source: docs.snowflake.com
Sources2
3.Trust Center scanners, violations and detections
The Trust Center checks an account's security posture against scanners, which are grouped into scanner packages. A run that finds nothing produces no finding. One that finds a problem produces one of two kinds. A violation is a configuration that stays wrong until you fix it, such as human users without MFA. A detection is a single event at a point in time, such as a login from an unrecognized IP address.
| Aspect | Violation | Detection |
|---|---|---|
| What it represents | A configuration that does not meet a scanner's requirements, persisting over time | A unique event that happened once |
| Remediation | Change the configuration. The finding remains until the scanner package next runs | Not possible directly. Investigate and prevent similar events |
| Lifecycle | Triage, resolve or reopen with a recorded justification. Resolved violations stop sending email notifications | Cannot be managed |
| Organization tab | Visible across all accounts | Not shown at organization level |
The Threat Intelligence package covers both kinds. It has schedule-based scanners, such as finding human users who sign in with only a password. It also has event-driven ones, such as login protection, which flags logins from unusual IP addresses. It runs once a day by default, and you can change the schedule. Some checks are shallow. The masking-policy check raises a violation only if the account has no masking policy at all. It does not check whether any table actually uses one.
| Task | Minimum application role |
|---|---|
| View account posture, violations, detections and the AI Security tab | SNOWFLAKE.TRUST_CENTER_VIEWER |
| Manage the violation lifecycle | SNOWFLAKE.TRUST_CENTER_ADMIN |
| Manage scanner packages and scanners, including schedules | SNOWFLAKE.TRUST_CENTER_ADMIN |
| View org-level violations in the organization account | ORGANIZATION_SECURITY_VIEWER plus SNOWFLAKE.TRUST_CENTER_ADMIN |
Checkpoint 3 of 5· Check yourself
The Trust Center's login protection scanner reports a sign-in from an unusual IP address. The security team investigates and blocks that IP. What can they now do with this finding in the Trust Center?
A login from an unusual IP is a detection: a unique event that has already happened. Detections cannot be remediated directly and have no lifecycle, so they cannot be triaged, resolved or reopened. Only violations can be resolved or reopened, and they clear after the configuration is changed and the scanner runs again.
“Because the event is unique and happened in the past, direct remediation of a detection isn’t possible.”Source: docs.snowflake.com
Sources3
4.Alerts and notifications
An alert pairs a condition with an action and a schedule. The condition is a SQL IF(EXISTS(...)) block. The action is the THEN block, which runs only when the condition is true. Alerts run on a fixed schedule, such as every 30 minutes, or when new rows arrive in the monitored table. They can use serverless compute or a named warehouse. Creating one needs EXECUTE ALERT on the account and CREATE ALERT on the schema, plus EXECUTE MANAGED ALERT for serverless alerts or USAGE on the warehouse.
CREATE OR REPLACE ALERT my_db.my_schema.task_error_rate_alert
FROM TEMPLATE TASKS_ERROR_RATE
WAREHOUSE = my_wh
SCHEDULE = '30 MINUTE'
TEMPLATE_PARAMS = '{
"template_variables": {
"ERROR_RATE_THRESHOLD": 0.4,
"SCOPE_ACTIVE": "DATABASE",
"SCOPE_DATABASE": "MY_DB"
},
"notification_config": {
"notification_integration": "my_email_int",
"email_config": { "toAddress": ["oncall@example.com"] }
}
}';New alerts start suspended, and nothing runs until ALTER ALERT ... RESUME. They execute with the alert owner's privileges. CREATE ALERT does not check identifiers or data types in the condition and action SQL, so mistakes only surface when the alert runs. Test the SQL as the owner role first, and look in ALERT_HISTORY for errors and for Triggered or Condition not met states. SUSPEND_ALERT_AFTER_NUM_FAILURES stops an alert that keeps failing. To avoid evaluating the same events twice, filter on SCHEDULED_TIME and LAST_SUCCESSFUL_SCHEDULED_TIME instead of CURRENT_TIMESTAMP.
Notifications are the most common alert action. A notification integration, either email or webhook, defines where messages go, and included stored procedures send them. Destinations include email, cloud provider queues, Slack, PagerDuty and Microsoft Teams. An action can also run a task or write a row to a table.
Checkpoint 4 of 5· Check yourself
An engineer creates an alert whose condition SQL misspells a column name. CREATE ALERT returns success. What happens next, and where do they look?
CREATE ALERT and ALTER ALERT skip checks such as identifier resolution in the condition and action SQL. The error shows up only when the alert runs, and ALERT_HISTORY is where to find it.
“Instead, the failure occurs when the alert executes.”Source: docs.snowflake.com
5.Data lineage
Data lineage records where an object's data came from and where it goes. It tracks two kinds of relationship. Data movement covers CTAS, INSERT and MERGE copying data between objects. Object dependencies cover cases where nothing is copied, such as a view referencing a table. A source is upstream of its target. After CREATE TABLE table2 AS SELECT col1 FROM table1, table2 and its col1 are downstream of table1.
In Snowsight, open Catalog » Explorer, pick a table or view, and select the Lineage tab. From there you can expand the graph one step at a time and see the SQL that created each downstream object, to the extent your privileges allow. Column lineage lists upstream and downstream columns by distance. It also flags columns that are missing a tag, or carry a different value, compared with related columns, and you can apply the fix with Review and Apply. This is how a sensitivity tag set on a source column reaches every copy. In SQL, SNOWFLAKE.CORE.GET_LINEAGE returns the same graph as rows, up to 5 levels deep. ACCOUNT_USAGE.TAG_REFERENCES_WITH_LINEAGE reports how each tag was applied. ACCESS_HISTORY records what an operation read, for example the base tables a dynamic table refresh lists in base_objects_accessed.
Checkpoint 5 of 5· Check yourself
You open the Lineage tab for a table. A view selects from that table, but no data is ever copied into the view. How does data lineage record this relationship?
Lineage tracks two kinds of relationship. Data movement covers operations that copy data, such as CTAS, INSERT and MERGE. Object dependencies cover cases where nothing is copied, like a view referencing a table. The table is the source, so it is upstream and the view is downstream.
“Tags can be propagated when an object depends on another object (for example, a view based on a tagged table)”Source: docs.snowflake.com
Sources
(11)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“each higher layer of keys (parent keys) encrypts the layer below (child keys)”
↩︎ Encryption key hierarchy, rotation and rekeying“Keys in the Snowflake-managed key hierarchy are automatically rotated by Snowflake when they are more than 30 days old.”
↩︎ Encryption key hierarchy, rotation and rekeying“Snowflake rekeys customer data files online, in the background, without any impact to currently running customer workloads.”
↩︎ Encryption key hierarchy, rotation and rekeying“For Enterprise Edition accounts, users with the ACCOUNTADMIN role can enable periodic rekeying for the account”
↩︎ Encryption key hierarchy, rotation and rekeying“When retired, the key is used solely to decrypt customer data and is only available for accessing the data.”
↩︎ Exam trap 1 - 2.
“The composite master key is never used to encrypt raw data.”
↩︎ Tri-Secret Secure and customer-managed keys“If the CMK in the composite master key hierarchy is revoked, your data can no longer be decrypted by Snowflake.”
↩︎ Tri-Secret Secure and customer-managed keys“You must wait 72 hours before activating Tri-Secret Secure”
↩︎ Tri-Secret Secure and customer-managed keys“Snowflake uses the old CMK until the rekeying process completes.”
↩︎ Checkpoint - 3.
“A detection occurs one time and represents a unique event.”
↩︎ Trust Center scanners, violations and detections“Email notifications are suppressed for resolved violations.”
↩︎ Trust Center scanners, violations and detections“The Threat Intelligence scanner package runs once a day by default, but you can change the schedule.”
↩︎ Trust Center scanners, violations and detections“Trust Center displays a violation if the account does not have at least one masking policy”
↩︎ Trust Center scanners, violations and detections“Because the event is unique and happened in the past, direct remediation of a detection”
↩︎ Exam trap 2“Because the event is unique and happened in the past, direct remediation of a detection isn’t possible.”
↩︎ Checkpoint - 4.
“With an alert, you can specify a condition, action, and schedule”
↩︎ Alerts and notifications“Snowflake supports sending notifications to email, cloud service provider queues, Slack, PagerDuty, and Microsoft Teams.”
↩︎ Alerts and notifications - 5.
“Alerts are executed using the privileges granted to the alert owner”
↩︎ Alerts and notifications“When you create an alert, the alert is suspended by default.”
↩︎ Exam trap 3“Instead, the failure occurs when the alert executes.”
↩︎ Checkpoint - 6.https://docs.snowflake.com/en/user-guide/alerts-uiOfficial docs
“You can use an email integration or a webhook integration.”
↩︎ Alerts and notifications - 7.
“Object dependencies, when an object references a base object but does not materialize or copy data”
↩︎ Data lineage - 8.
“The number of levels of lineage to retrieve. The maximum is 5; this is also the default.”
↩︎ Data lineage - 9.
“The base tables read during a refresh appear in the base_objects_accessed field.”
↩︎ Data lineage
Also cited
“sensitive data in Snowflake is not modified in an existing table (i.e. no static masking)”
↩︎ Checkpoint“Tags can be propagated when an object depends on another object (for example, a view based on a tagged table)”
↩︎ Checkpoint