Skip to main content

Network Policies

🌐 What are Network Policies in Snowflake?​

Network Policies in Snowflake allow administrators to control and restrict client connections to Snowflake based on IP addresses or CIDR ranges. This enhances security by ensuring only trusted networks can access your Snowflake account.


🎯 Why Use Network Policies?​

  • βœ”οΈ Limit access to known and trusted networks (like your office, VPN, cloud environment).
  • βœ”οΈ Prevent unauthorized connections from unknown IP addresses.
  • βœ”οΈ Meet security and compliance requirements (like PCI-DSS, SOC 2).
  • βœ”οΈ Reduce risk of credential theft by limiting where logins can occur from.

βš™οΈ How to Create and Use Network Policies​

1️⃣ Create a Network Policy​

Use the CREATE NETWORK POLICY command:

CREATE NETWORK POLICY my_policy
ALLOWED_IP_LIST = ('203.0.113.0/24', '198.51.100.10')
BLOCKED_IP_LIST = ('192.0.2.0/24');
  • βœ… ALLOWED_IP_LIST: IPs or CIDRs that are permitted.

  • βœ… BLOCKED_IP_LIST: IPs or CIDRs that are explicitly denied, even if they’re in the allowed list.


2️⃣ Assign the Policy​

Assign to the entire account:

ALTER ACCOUNT SET NETWORK_POLICY = my_policy;

Or to a specific user (overrides the account-level policy):

ALTER USER jdoe SET NETWORK_POLICY = my_policy;

3️⃣ Manage and View Policies​

  • βœ… List all policies:
SHOW NETWORK POLICIES;
  • βœ… Describe a specific policy:
DESCRIBE NETWORK POLICY my_policy;
  • βœ… Remove a policy (unassign from the account/user):
ALTER ACCOUNT UNSET NETWORK_POLICY;
ALTER USER jdoe UNSET NETWORK_POLICY;
  • βœ… Drop a policy (permanently delete):
DROP NETWORK POLICY my_policy;

⚠️ Limitations and Considerations​

❌ Policies only control login access – they don’t apply to Snowflake data transfers (like loading data via Snowpipe).

❌ Snowflake’s public endpoints are still accessible to those within allowed IPs – consider private connectivity (like PrivateLink) for stronger isolation.


πŸ” Roles and Privileges for Network Policies​

Role/PrivilegePurpose
ACCOUNTADMINFull control to create, assign, drop policies.
SECURITYADMINCan manage policies at the user level.

🌟 Best Practices for Network Policies​

  • βœ… Start with known trusted IPs (like corporate VPN, office subnets).
  • βœ… Use CIDR ranges for easier management of cloud-based infrastructure.
  • βœ… Combine network policies + MFA for robust defense.
  • βœ… Review LOGIN_HISTORY for failed login attempts from blocked networks.
  • βœ… Regularly update allowed lists as your network evolves.

⚑ Key Takeaways​

  • βœ”οΈ Network Policies restrict who can connect to Snowflake based on IP.
  • βœ”οΈ Use CREATE NETWORK POLICY to define them and assign them to users or the entire account.
  • βœ”οΈ Helps with security, compliance, and risk reduction.
  • βœ”οΈ Pair with MFA and private connectivity (like AWS PrivateLink) for stronger security posture.