How to Achieve HIPAA Compliance in Snowflake

Galaxy Glossary

How do I configure Snowflake to meet HIPAA compliance?

Configure Snowflake features—encryption, access controls, masking policies—to satisfy HIPAA’s Security and Privacy Rules.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.

Description

What does HIPAA compliance mean for Snowflake customers?

HIPAA requires covered entities and business associates to protect electronic protected health information (ePHI). In Snowflake, this translates to enforcing encryption at rest & in transit, strict access controls, robust auditing, and data‐masking strategies.

Which Snowflake edition is HIPAA ready?

Snowflake Business Critical (formerly Enterprise for Sensitive Data) offers the baseline—automatic encryption, Tri‐Secret Secure, and corporate VPN/VPC support—needed to meet HIPAA requirements.

How do I encrypt data to comply with HIPAA?

All Snowflake accounts encrypt storage by default, but HIPAA workloads often enable Tri-Secret Secure. This feature adds a customer-managed key (CMK) to Snowflake’s key hierarchy, giving you the ability to revoke access instantly.

Syntax to enable Tri-Secret Secure

ALTER ACCOUNT SET MASTER_KEY_CMK = ''; -- once per account

How can I limit who views ePHI?

Implement role-based access control (RBAC) and dynamic data masking. Use masking policies to redact columns containing ePHI except for authorized roles.

Masking policy example

CREATE OR REPLACE MASKING POLICY pii_mask AS
(val STRING) RETURNS STRING ->
CASE
WHEN CURRENT_ROLE() IN ('PHI_READ') THEN val
ELSE 'REDACTED'
END;

ALTER TABLE Customers MODIFY COLUMN email SET MASKING POLICY pii_mask;

How do I log and audit activity?

Use ACCOUNT_USAGE views or stream data into an external SIEM. HIPAA calls for audit trails of who accessed ePHI and when. Retain logs for at least six years.

How to configure network policies?

Restrict traffic with CREATE NETWORK POLICY. Allow connections only from trusted corporate IPs or private endpoints, minimizing breach risks.

What’s the step-by-step checklist?

1) Upgrade to Business Critical. 2) Configure Tri-Secret Secure. 3) Define RBAC hierarchy. 4) Apply masking policies on ePHI columns. 5) Set network policies. 6) Enable object lifecycles & logging retention. 7) Execute annual risk assessments and sign a BAA with Snowflake.

Why How to Achieve HIPAA Compliance in Snowflake is important

How to Achieve HIPAA Compliance in Snowflake Example Usage


-- Show masked vs. unmasked output for verification
USE ROLE phi_read;
SELECT id, name, email FROM Customers LIMIT 5; -- Email visible

USE ROLE analyst;
SELECT id, name, email FROM Customers LIMIT 5; -- Email shows 'REDACTED'

How to Achieve HIPAA Compliance in Snowflake Syntax


-- Enable Tri-Secret Secure
ALTER ACCOUNT SET MASTER_KEY_CMK = '<aws_kms_key_arn>';

-- Create a PHI-specific role and grant least-privilege access
CREATE ROLE phi_read;
GRANT USAGE ON DATABASE prod TO ROLE phi_read;
GRANT SELECT ON ALL TABLES IN SCHEMA prod.public TO ROLE phi_read;

-- Define masking policy for email (PII) in Customers table
CREATE OR REPLACE MASKING POLICY pii_email_mask AS
  (val STRING) RETURNS STRING ->
    CASE WHEN CURRENT_ROLE() IN ('phi_read') THEN val ELSE 'REDACTED' END;

-- Apply policy
ALTER TABLE Customers MODIFY COLUMN email SET MASKING POLICY pii_email_mask;

-- Audit query execution
SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY WHERE QUERY_TEXT ILIKE '%Customers%';

-- Restrict network access
CREATE OR REPLACE NETWORK POLICY office_only ALLOWED_IP_LIST=('203.0.113.0/24');
ALTER ACCOUNT SET NETWORK_POLICY = office_only;

Common Mistakes

Frequently Asked Questions (FAQs)

Does Snowflake sign a BAA?

Yes. After upgrading to Business Critical, request a Business Associate Agreement through your Snowflake account team.

Is column-level encryption required?

Not if Tri-Secret Secure and masking policies are implemented, because all data is already encrypted at rest and in transit. Column-level encryption adds overhead and is rarely necessary.

How long should I retain audit logs?

HIPAA recommends six years. Store QUERY_HISTORY and ACCESS_HISTORY extracts in long-term object storage or Snowflake stages.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie
BauHealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.