What you will be able to do
- Describe how Snowflake encrypts customer data with a four-level hierarchical key model
- Tell key rotation apart from periodic rekeying, and enable rekeying with an account parameter
- Explain how Tri-Secret Secure combines a customer-managed key with a Snowflake key, and what happens if that key is revoked
- Put the Tri-Secret Secure self-registration steps in order
- Control which roles can use Cortex AI functions with account privileges and SNOWFLAKE database roles
1.How Snowflake encrypts customer data
Every Snowflake account is encrypted, with no setup needed. All customer data is encrypted by default with AES, and the keys are managed in a hierarchy whose root lives in a cloud provider's hardware security module (HSM). Encryption and key management need no configuration from the customer.
In the hierarchy, each layer of keys encrypts, or "wraps", the layer below it. There are four levels, from the top: the root key, account master keys, table master keys and file keys. Each account has its own key hierarchy, so separate account master keys keep tenants apart as well as the access control model does. Lower levels cover less data: a table master key encrypts one table, and a file key encrypts one file.
On AWS and Azure, Snowflake creates and stores the root key in the HSM. On Google Cloud, it does this through Google Cloud KMS, in multi-tenant HSM partitions.
Checkpoint 1 of 7· Check yourself
A compliance form asks for Snowflake's key hierarchy from top to bottom. Which order is correct?
The root key in the HSM wraps account master keys, which wrap table master keys, which wrap file keys. The last option has the right levels but lists them bottom to top.
“Each customer account has a separate key hierarchy of account-level, table-level, and file-level keys”Source: docs.snowflake.com
Sources1
2.Key rotation and periodic rekeying
Keys move through three states: active, retired and destroyed. Snowflake rotates keys in its hierarchy automatically once they are more than 30 days old. The active key is retired and a new random key is created. Only the active key encrypts new data. Retired keys can only decrypt. For example, if a table master key was version 1 in April, version 1 still decrypts April's data in June, while version 3 encrypts June's inserts. Because rotation is automatic, a key older than 30 days needs no action from the administrator.
Rotation moves a key from active to retired. Rekeying moves it from retired to destroyed. With periodic rekeying enabled, once a retired key is more than a year old, Snowflake re-encrypts the data it protects with a new key and destroys the old one. On Enterprise Edition, ACCOUNTADMIN enables this with the PERIODIC_DATA_REKEYING account parameter. Rekeying runs online in the background, without downtime, and does not change Time Travel or Fail-safe retention. The one cost is storage: rekeyed files are charged for 7 days of Fail-safe.
Checkpoint 2 of 7· Match them up
Match each key state to how Snowflake uses a key in that state
Tap a term, then the definition that fits it.
Rotation moves a key from active to retired. Rekeying moves it from retired to destroyed.
“When a key is destroyed, it is not used for either encryption or decryption.”Source: docs.snowflake.com
Checkpoint 3 of 7· Exam question
A platform team is weighing whether to move six existing Snowflake accounts into a single organization. Which TWO statements about the benefits of doing so are accurate? Select TWO.(Select 2)
Correct answers: A, C — Credit, storage and data transfer usage for all member accounts can be queried together through the ORGANIZATION_USAGE schema views; Organization administrators can create, rename and drop member accounts themselves with SQL rather than raising a support case for each change
- A. The ORGANIZATION_USAGE views report metering, storage and transfer for every account in one place, which supports central cost reporting. This is a documented organization capability.
- B. Organization membership does not open data access between accounts. Cross-account reads still need secure data sharing or replication.
- C. ORGADMIN runs CREATE ACCOUNT, ALTER ACCOUNT RENAME and DROP ACCOUNT, so lifecycle changes no longer depend on Snowflake Support. This is a core benefit of using an organization.
- D. Users, roles and network policies are defined inside each account and are not shared by organization membership. Each account keeps its own security configuration.
- E. Edition is chosen per account, so a Standard account and a Business Critical account can live in the same organization. Nothing is inherited between them.
Sources1
3.Tri-Secret Secure and customer-managed keys
Some customers want to hold a key of their own. A customer-managed key (CMK) is a master key kept in the key management service of the cloud that hosts the account. Tri-Secret Secure combines it with a Snowflake-maintained key to form a composite master key. Together with Snowflake's user authentication, that gives three levels of protection.
The composite key acts as the account master key: it wraps the keys below it, and it never encrypts raw data. That design gives the customer control, and also responsibility. If the CMK is revoked, Snowflake can no longer decrypt your data.
| Cloud platform | Key management service | System function for key information |
|---|---|---|
| AWS | AWS Key Management Service (KMS) | SYSTEM$GET_CMK_KMS_KEY_POLICY |
| Google Cloud | Cloud Key Management Service (Cloud KMS) | SYSTEM$GET_GCP_KMS_CMK_GRANT_ACCESS_CMD |
| Microsoft Azure | Azure Key Vault | SYSTEM$GET_CMK_AKV_CONSENT_URL |
You can turn on automatic CMK rotation in your cloud provider without doing anything in Snowflake. Snowflake does not start using the new key version right away. It picks it up the next time it rotates the account master key, which happens every 30 days. Existing files are still decrypted with earlier CMK versions, so never delete old versions or revoke access to them. Replacing the CMK with a different key is a manual change coordinated with Snowflake Support.
Checkpoint 4 of 7· Check yourself
An engineer accidentally disables the CMK behind a Tri-Secret Secure account. What is the effect?
The composite master key needs both halves. Without the CMK, Snowflake cannot unwrap the keys that protect the data.
“If the customer-managed key (CMK) in the composite master key hierarchy is revoked, your data can no longer be decrypted by Snowflake.”Source: docs.snowflake.com
4.Registering a CMK and activating Tri-Secret Secure
Setting up Tri-Secret Secure is split between you and Support. You register your CMK yourself using system functions, and then Snowflake Support enables Tri-Secret Secure for the account you name. The steps are the same on every cloud, though the function arguments differ; on Azure, for example, SYSTEM$GET_CMK_CONFIG needs your tenant_id.
After activation, SYSTEM$GET_CMK_INFO reports progress. Its output says the key "is being activated" while rekeying is still running and "is activated" when it finishes. To change the CMK later, repeat the same registration steps with the new key. While data is re-encrypted, the function reports that the key "is being rekeyed".
Checkpoint 5 of 7· Put it in order
Put the Tri-Secret Secure self-registration steps in order
- 1.Call SYSTEM$GET_CMK_CONFIG and use its output to authorize the CMK on the cloud provider
- 2.Call SYSTEM$REGISTER_CMK_INFO to register the CMK
- 3.Contact Snowflake Support to enable Tri-Secret Secure for the account
- 4.Create the CMK in the cloud provider's key management service
- 5.Call SYSTEM$GET_CMK_INFO to view the registered CMK details
- 6.Call SYSTEM$VERIFY_CMK_INFO to confirm connectivity
The key must exist before you can register it, the policy must be applied before connectivity can be verified, and Support activates Tri-Secret Secure only after you have registered the key.
“call the SYSTEM$VERIFY_CMK_INFO system function to confirm the connectivity between your Snowflake account and your CMK.”Source: docs.snowflake.com
Checkpoint 6 of 7· Exam question
An ORGADMIN must create a Business Critical account in Azure West Europe for the finance department. Which sequence creates the account successfully?
Correct answer: C — USE ROLE ORGADMIN; CREATE ACCOUNT fin_eu ADMIN_NAME = fin_admin ADMIN_PASSWORD = 'Str0ng!Pass1' EMAIL = 'fin@acme.com' EDITION = BUSINESS_CRITICAL REGION = azure_westeurope;
- A. EDITION is a required parameter of CREATE ACCOUNT, so the statement is rejected when it is left out. The region and role are correct, but the missing edition is the fault.
- B. CREATE ORGANIZATION ACCOUNT creates the special organization account used for organization-level administration, not an ordinary member account. It also omits the region and so does not meet the requirement.
- C. ORGADMIN is the role that can create accounts, and the statement supplies the required administrator name, credential, email and edition plus the target region. This is the correct form.
- D. ACCOUNTADMIN manages a single account and does not hold the organization privilege to create new accounts. The statement fails on the role even though the parameters are right.
Sources2
5.Enabling Cortex AI functions for users
Cortex AI access is also governed at the account level, with two separate gates. A user needs the USE AI FUNCTIONS account privilege, or a per-function USE AI FUNCTION <name> privilege, and also one of the database roles SNOWFLAKE.CORTEX_USER or SNOWFLAKE.AI_FUNCTIONS_USER.
By default every user passes both gates: USE AI FUNCTIONS and CORTEX_USER are both granted to PUBLIC. To restrict access, ACCOUNTADMIN revokes them from PUBLIC and grants them to chosen roles. AI_FUNCTIONS_USER is not granted to PUBLIC. It allows the scalar AI functions without access to Cortex services such as Cortex Agent, Cortex Analyst or Cortex Search. Neither database role can be granted directly to a user; grant it to a role the user can assume.
The blanket and per-function privileges combine with OR. A role that has USE AI FUNCTIONS can call every function, so revoking a per-function grant from it changes nothing. One exception to know: USE AI FUNCTIONS does not currently apply to AI function queries run inside Snowflake native applications.
USE ROLE ACCOUNTADMIN;
-- Remove blanket access from PUBLIC
REVOKE USE AI FUNCTIONS ON ACCOUNT FROM ROLE PUBLIC;
-- Create a role with access to only AI_COMPLETE
CREATE ROLE ai_complete_user_role;
GRANT USE AI FUNCTION AI_COMPLETE ON ACCOUNT TO ROLE ai_complete_user_role;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE ai_complete_user_role;
GRANT ROLE ai_complete_user_role TO USER example_user;Checkpoint 7 of 7· Fill the gap
Which role do you revoke the privilege from to stop every user in the account from using Cortex AI functions by default?
REVOKE USE AI FUNCTIONS ON ACCOUNT
FROM ROLE ? ;USE AI FUNCTIONS is granted to PUBLIC by default, and every user and role inherits PUBLIC.
Source: docs.snowflake.comSources3
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Key rotation destroys the old key and re-encrypts existing data, so an administrator should step in when a key passes 30 days.Why is that wrong?
Rotation is automatic and only retires the old key. Re-encrypting data and destroying a retired key is periodic rekeying, which acts on keys retired for more than a year and must be enabled on Enterprise Edition.
Covered in Key rotation and periodic rekeying
2.Under Tri-Secret Secure, the composite master key encrypts the raw data files directly.Why is that wrong?
The composite key takes the place of the account master key and only wraps lower keys. File keys, derived from table master keys, encrypt the raw data.
Covered in Tri-Secret Secure and customer-managed keys
3.Granting USE AI FUNCTIONS to a role is enough for its users to call Cortex AI functions.Why is that wrong?
Users also need the CORTEX_USER or AI_FUNCTIONS_USER database role, granted through a role. If CORTEX_USER has been revoked from PUBLIC, the privilege alone is not enough.
Covered in Enabling Cortex AI functions for users
Practise it for real
Limit Cortex AI functions to one custom role instead of every user in the account
1.Run USE ROLE ACCOUNTADMIN; then REVOKE USE AI FUNCTIONS ON ACCOUNT FROM ROLE PUBLIC;
Why: Only ACCOUNTADMIN can manage this privilege, and PUBLIC holds it by default
You should see: Users who relied on PUBLIC can no longer call most Cortex AI functions
2.Run CREATE ROLE cortex_user_role; then GRANT USE AI FUNCTIONS ON ACCOUNT TO ROLE cortex_user_role;
Why: This gives the account-level gate to a role you control
You should see: The new role holds the USE AI FUNCTIONS privilege
3.Run GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE cortex_user_role;
Why: The privilege also needs a Cortex database role, which must be granted to a role rather than a user
You should see: The role now passes both gates
4.Run GRANT ROLE cortex_user_role TO USER example_user; then SHOW GRANTS TO ROLE cortex_user_role;
Why: This assigns the role to the user and confirms what the role holds
You should see: SHOW GRANTS lists USE AI FUNCTIONS for the role
Stuck? Get a nudge
If a test user still can't call a function, check that the role has both the privilege and the database role. They are separate gates.
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Snowflake uses strong AES encryption with a hierarchical key model rooted in a cloud-provider-hosted hardware security module.”
↩︎ How Snowflake encrypts customer data“the hierarchical key model isolates every account with the use of separate account master keys.”
↩︎ How Snowflake encrypts customer data“On AWS and Azure, Snowflake uses the HSM to create and store the root key.”
↩︎ How Snowflake encrypts customer data“Keys in the Snowflake-managed key hierarchy are automatically rotated by Snowflake when they are more than 30 days old.”
↩︎ Key rotation and periodic rekeying“For Enterprise Edition accounts, users with the ACCOUNTADMIN role can enable periodic rekeying for the account”
↩︎ Key rotation and periodic rekeying“For these files, 7 days of Fail-safe protection is charged.”
↩︎ Key rotation and periodic rekeying“Deleting a rotated key can lead to data loss.”
↩︎ Tri-Secret Secure and customer-managed keys“rekeying ensures that a key is transferred from its retired state to being destroyed.”
↩︎ Exam trap 1“Each customer account has a separate key hierarchy of account-level, table-level, and file-level keys”
↩︎ Checkpoint“When retired, the key is used solely to decrypt customer data and is only available for accessing the data.”
↩︎ Prediction“When a key is destroyed, it is not used for either encryption or decryption.”
↩︎ Checkpoint - 2.
“This composite master key acts as an account master key by wrapping all of the keys in your account hierarchy.”
↩︎ Tri-Secret Secure and customer-managed keys“Contact Snowflake Support to enable your Snowflake account to use Tri-Secret Secure.”
↩︎ Registering a CMK and activating Tri-Secret Secure“You can call SYSTEM$GET_CMK_INFO at any time, to check the registration and activation status of your CMK.”
↩︎ Registering a CMK and activating Tri-Secret Secure“The composite master key is never used to encrypt raw data.”
↩︎ Exam trap 2“If the customer-managed key (CMK) in the composite master key hierarchy is revoked, your data can no longer be decrypted by Snowflake.”
↩︎ Checkpoint“call the SYSTEM$VERIFY_CMK_INFO system function to confirm the connectivity between your Snowflake account and your CMK.”
↩︎ Checkpoint - 3.
“By default, the USE AI FUNCTIONS privilege is granted to the PUBLIC role.”
↩︎ Enabling Cortex AI functions for users“If a role has USE AI FUNCTIONS, it can call all Cortex AI functions, regardless of any per-function grants or revocations.”
↩︎ Enabling Cortex AI functions for users“AI_FUNCTIONS_USER role is not granted to the PUBLIC role by default.”
↩︎ Enabling Cortex AI functions for users“one of the CORTEX_USER or AI_FUNCTIONS_USER database roles to use Snowflake Cortex AI Functions.”
↩︎ Exam trap 3