Enforcing MFA in Snowflake: Quick Steps

To Nha Notes | Dec. 24, 2024, 11:33 a.m.

Create an Authentication Policy

CREATE AUTHENTICATION POLICY MP_COMMON.PUBLIC.require_mfa_authentication_policy  
  MFA_ENROLLMENT = REQUIRED;  

Apply the Policy to a User
Enforce the policy for a user, e.g., TONHATEST:

ALTER USER TONHATEST SET AUTHENTICATION POLICY MP_COMMON.PUBLIC.require_mfa_authentication_policy;  
or

ALTER ACCOUNT SET AUTHENTICATION POLICY MP_COMMON.PUBLIC.require_mfa_authentication_policy;

List Existing Authentication Policies
SHOW AUTHENTICATION POLICIES;  

Querying At-Risk Entities

To monitor and analyze at-risk entities related to authentication or security, you can run the following query:

SELECT  
  EVENT_ID,  
  f.value:entity_id::VARCHAR AS entity_id,  
  f.value:entity_name::VARCHAR AS entity_name,  
  f.value:entity_object_type::VARCHAR AS entity_object_type,  
  f.value:entity_detail AS entity_detail  
FROM  
  snowflake.trust_center.findings,  
  LATERAL FLATTEN(input => at_risk_entities) AS f  
ORDER BY EVENT_ID DESC;  

References

https://docs.snowflake.com/en/user-guide/authentication-policies#hardening-user-or-account-authentication-using-mfa