LogoLogo
Knowledge BaseCommunityRelease NotesRequest Demo
  • Overview
  • Quick Start
    • Onboarding Guide
  • Data Sources & Transports
    • Supported Logs
      • 1Password Logs
      • Apache Logs
      • AppOmni Logs
      • Asana Logs
      • Atlassian Logs
      • Auditd Logs
      • Auth0 Logs
      • AWS Logs
        • AWS ALB
        • AWS Aurora
        • AWS CloudFront
        • AWS CloudTrail
        • AWS CloudWatch
        • AWS Config
        • AWS EKS
        • AWS GuardDuty
        • AWS Security Hub
        • Amazon Security Lake
        • AWS S3
        • AWS Transit Gateway
        • AWS VPC
        • AWS WAF
      • Azure Monitor Logs
      • Bitwarden Logs
      • Box Logs
      • Carbon Black Logs
      • Cisco Umbrella Logs
      • Cloudflare Logs
      • CrowdStrike Logs
        • CrowdStrike Falcon Data Replicator
        • CrowdStrike Event Streams
      • Docker Logs
      • Dropbox Logs
      • Duo Security Logs
      • Envoy Logs
      • Fastly Logs
      • Fluentd Logs
      • GCP Logs
      • GitHub Logs
      • GitLab Logs
      • Google Workspace Logs
      • Heroku Logs
      • Jamf Pro Logs
      • Juniper Logs
      • Lacework Logs
        • Lacework Alert Channel Webhook
        • Lacework Export
      • Material Security Logs
      • Microsoft 365 Logs
      • Microsoft Entra ID Audit Logs
      • Microsoft Graph Logs
      • MongoDB Atlas Logs
      • Netskope Logs
      • Nginx Logs
      • Notion Logs
      • Okta Logs
      • OneLogin Logs
      • Orca Security Logs (Beta)
      • Osquery Logs
      • OSSEC Logs
      • Proofpoint Logs
      • Push Security Logs
      • Rapid7 Logs
      • Salesforce Logs
      • SentinelOne Logs
      • Slack Logs
      • Snowflake Audit Logs (Beta)
      • Snyk Logs
      • Sophos Logs
      • Sublime Security Logs
      • Suricata Logs
      • Sysdig Logs
      • Syslog Logs
      • Tailscale Logs
      • Teleport Logs
      • Tenable Vulnerability Management Logs
      • Thinkst Canary Logs
      • Tines Logs
      • Tracebit Logs
      • Windows Event Logs
      • Wiz Logs
      • Zeek Logs
      • Zendesk Logs
      • Zoom Logs
      • Zscaler Logs
        • Zscaler ZIA
        • Zscaler ZPA
    • Custom Logs
      • Log Schema Reference
      • Transformations
      • Script Log Parser (Beta)
      • Fastmatch Log Parser
      • Regex Log Parser
      • CSV Log Parser
    • Data Transports
      • HTTP Source
      • AWS Sources
        • S3 Source
        • CloudWatch Logs Source
        • SQS Source
          • SNS Source
        • EventBridge
      • Google Cloud Sources
        • Cloud Storage (GCS) Source
        • Pub/Sub Source
      • Azure Blob Storage Source
    • Monitoring Log Sources
    • Ingestion Filters
      • Raw Event Filters
      • Normalized Event Filters (Beta)
    • Data Pipeline Tools
      • Chronosphere Onboarding Guide
      • Cribl Onboarding Guide
      • Fluent Bit Onboarding Guide
        • Fluent Bit Configuration Examples
      • Fluentd Onboarding Guide
        • General log forwarding via Fluentd
        • MacOS System Logs to S3 via Fluentd
        • Syslog to S3 via Fluentd
        • Windows Event Logs to S3 via Fluentd (Legacy)
        • GCP Audit to S3 via Fluentd
      • Observo Onboarding Guide
      • Tarsal Onboarding Guide
    • Tech Partner Log Source Integrations
  • Detections
    • Using Panther-managed Detections
      • Detection Packs
    • Rules and Scheduled Rules
      • Writing Python Detections
        • Python Rule Caching
        • Data Models
        • Global Helper Functions
      • Modifying Detections with Inline Filters (Beta)
      • Derived Detections (Beta)
        • Using Derived Detections to Avoid Merge Conflicts
      • Using the Simple Detection Builder
      • Writing Simple Detections
        • Simple Detection Match Expression Reference
        • Simple Detection Error Codes
    • Correlation Rules (Beta)
      • Correlation Rule Reference
    • PyPanther Detections (Beta)
      • Creating PyPanther Detections
      • Registering, Testing, and Uploading PyPanther Detections
      • Managing PyPanther Detections in the Panther Console
      • PyPanther Detections Style Guide
      • pypanther Library Reference
      • Using the pypanther Command Line Tool
    • Signals
    • Policies
    • Testing
      • Data Replay (Beta)
    • Framework Mapping and MITRE ATT&CK® Matrix
  • Cloud Security Scanning
    • Cloud Resource Attributes
      • AWS
        • ACM Certificate
        • CloudFormation Stack
        • CloudWatch Log Group
        • CloudTrail
        • CloudTrail Meta
        • Config Recorder
        • Config Recorder Meta
        • DynamoDB Table
        • EC2 AMI
        • EC2 Instance
        • EC2 Network ACL
        • EC2 SecurityGroup
        • EC2 Volume
        • EC2 VPC
        • ECS Cluster
        • EKS Cluster
        • ELBV2 Application Load Balancer
        • GuardDuty Detector
        • GuardDuty Detector Meta
        • IAM Group
        • IAM Policy
        • IAM Role
        • IAM Root User
        • IAM User
        • KMS Key
        • Lambda Function
        • Password Policy
        • RDS Instance
        • Redshift Cluster
        • Route 53 Domains
        • Route 53 Hosted Zone
        • S3 Bucket
        • WAF Web ACL
  • Alerts & Destinations
    • Alert Destinations
      • Amazon SNS Destination
      • Amazon SQS Destination
      • Asana Destination
      • Blink Ops Destination
      • Custom Webhook Destination
      • Discord Destination
      • GitHub Destination
      • Google Pub/Sub Destination (Beta)
      • Incident.io Destination
      • Jira Cloud Destination
      • Jira Data Center Destination (Beta)
      • Microsoft Teams Destination
      • Mindflow Destination
      • OpsGenie Destination
      • PagerDuty Destination
      • Rapid7 Destination
      • ServiceNow Destination (Custom Webhook)
      • Slack Bot Destination
      • Slack Destination (Webhook)
      • Splunk Destination (Beta)
      • Tines Destination
      • Torq Destination
    • Assigning and Managing Alerts
      • Managing Alerts in Slack
    • Alert Runbooks
      • Panther-managed Policies Runbooks
        • AWS CloudTrail Is Enabled In All Regions
        • AWS CloudTrail Sending To CloudWatch Logs
        • AWS KMS CMK Key Rotation Is Enabled
        • AWS Application Load Balancer Has Web ACL
        • AWS Access Keys Are Used Every 90 Days
        • AWS Access Keys are Rotated Every 90 Days
        • AWS ACM Certificate Is Not Expired
        • AWS Access Keys not Created During Account Creation
        • AWS CloudTrail Has Log Validation Enabled
        • AWS CloudTrail S3 Bucket Has Access Logging Enabled
        • AWS CloudTrail Logs S3 Bucket Not Publicly Accessible
        • AWS Config Is Enabled for Global Resources
        • AWS DynamoDB Table Has Autoscaling Targets Configured
        • AWS DynamoDB Table Has Autoscaling Enabled
        • AWS DynamoDB Table Has Encryption Enabled
        • AWS EC2 AMI Launched on Approved Host
        • AWS EC2 AMI Launched on Approved Instance Type
        • AWS EC2 AMI Launched With Approved Tenancy
        • AWS EC2 Instance Has Detailed Monitoring Enabled
        • AWS EC2 Instance Is EBS Optimized
        • AWS EC2 Instance Running on Approved AMI
        • AWS EC2 Instance Running on Approved Instance Type
        • AWS EC2 Instance Running in Approved VPC
        • AWS EC2 Instance Running On Approved Host
        • AWS EC2 Instance Running With Approved Tenancy
        • AWS EC2 Instance Volumes Are Encrypted
        • AWS EC2 Volume Is Encrypted
        • AWS GuardDuty is Logging to a Master Account
        • AWS GuardDuty Is Enabled
        • AWS IAM Group Has Users
        • AWS IAM Policy Blocklist Is Respected
        • AWS IAM Policy Does Not Grant Full Administrative Privileges
        • AWS IAM Policy Is Not Assigned Directly To User
        • AWS IAM Policy Role Mapping Is Respected
        • AWS IAM User Has MFA Enabled
        • AWS IAM Password Used Every 90 Days
        • AWS Password Policy Enforces Complexity Guidelines
        • AWS Password Policy Enforces Password Age Limit Of 90 Days Or Less
        • AWS Password Policy Prevents Password Reuse
        • AWS RDS Instance Is Not Publicly Accessible
        • AWS RDS Instance Snapshots Are Not Publicly Accessible
        • AWS RDS Instance Has Storage Encrypted
        • AWS RDS Instance Has Backups Enabled
        • AWS RDS Instance Has High Availability Configured
        • AWS Redshift Cluster Allows Version Upgrades
        • AWS Redshift Cluster Has Encryption Enabled
        • AWS Redshift Cluster Has Logging Enabled
        • AWS Redshift Cluster Has Correct Preferred Maintenance Window
        • AWS Redshift Cluster Has Sufficient Snapshot Retention Period
        • AWS Resource Has Minimum Number of Tags
        • AWS Resource Has Required Tags
        • AWS Root Account Has MFA Enabled
        • AWS Root Account Does Not Have Access Keys
        • AWS S3 Bucket Name Has No Periods
        • AWS S3 Bucket Not Publicly Readable
        • AWS S3 Bucket Not Publicly Writeable
        • AWS S3 Bucket Policy Does Not Use Allow With Not Principal
        • AWS S3 Bucket Policy Enforces Secure Access
        • AWS S3 Bucket Policy Restricts Allowed Actions
        • AWS S3 Bucket Policy Restricts Principal
        • AWS S3 Bucket Has Versioning Enabled
        • AWS S3 Bucket Has Encryption Enabled
        • AWS S3 Bucket Lifecycle Configuration Expires Data
        • AWS S3 Bucket Has Logging Enabled
        • AWS S3 Bucket Has MFA Delete Enabled
        • AWS S3 Bucket Has Public Access Block Enabled
        • AWS Security Group Restricts Ingress On Administrative Ports
        • AWS VPC Default Security Group Restricts All Traffic
        • AWS VPC Flow Logging Enabled
        • AWS WAF Has Correct Rule Ordering
        • AWS CloudTrail Logs Encrypted Using KMS CMK
      • Panther-managed Rules Runbooks
        • AWS CloudTrail Modified
        • AWS Config Service Modified
        • AWS Console Login Failed
        • AWS Console Login Without MFA
        • AWS EC2 Gateway Modified
        • AWS EC2 Network ACL Modified
        • AWS EC2 Route Table Modified
        • AWS EC2 SecurityGroup Modified
        • AWS EC2 VPC Modified
        • AWS IAM Policy Modified
        • AWS KMS CMK Loss
        • AWS Root Activity
        • AWS S3 Bucket Policy Modified
        • AWS Unauthorized API Call
    • Tech Partner Alert Destination Integrations
  • Investigations & Search
    • Search
      • Search Filter Operators
    • Data Explorer
      • Data Explorer SQL Search Examples
        • CloudTrail logs queries
        • GitHub Audit logs queries
        • GuardDuty logs queries
        • Nginx and ALB Access logs queries
        • Okta logs queries
        • S3 Access logs queries
        • VPC logs queries
    • Visualization and Dashboards
      • Custom Dashboards (Beta)
      • Panther-Managed Dashboards
    • Standard Fields
    • Saved and Scheduled Searches
      • Templated Searches
        • Behavioral Analytics and Anomaly Detection Template Macros (Beta)
      • Scheduled Search Examples
    • Search History
    • Data Lakes
      • Snowflake
        • Snowflake Configuration for Optimal Search Performance
      • Athena
  • PantherFlow (Beta)
    • PantherFlow Quick Reference
    • PantherFlow Statements
    • PantherFlow Operators
      • Datatable Operator
      • Extend Operator
      • Join Operator
      • Limit Operator
      • Project Operator
      • Range Operator
      • Sort Operator
      • Search Operator
      • Summarize Operator
      • Union Operator
      • Visualize Operator
      • Where Operator
    • PantherFlow Data Types
    • PantherFlow Expressions
    • PantherFlow Functions
      • Aggregation Functions
      • Date/time Functions
      • String Functions
      • Array Functions
      • Math Functions
      • Control Flow Functions
      • Regular Expression Functions
      • Snowflake Functions
      • Data Type Functions
      • Other Functions
    • PantherFlow Example Queries
      • PantherFlow Examples: Threat Hunting Scenarios
      • PantherFlow Examples: SOC Operations
      • PantherFlow Examples: Panther Audit Logs
  • Enrichment
    • Custom Lookup Tables
      • Creating a GreyNoise Lookup Table
      • Lookup Table Examples
        • Using Lookup Tables: 1Password UUIDs
      • Lookup Table Specification Reference
    • Identity Provider Profiles
      • Okta Profiles
      • Google Workspace Profiles
    • Anomali ThreatStream
    • IPinfo
    • Tor Exit Nodes
    • TrailDiscover (Beta)
  • Panther AI (Beta)
    • Managing Panther AI Response History
  • System Configuration
    • Role-Based Access Control
    • Identity & Access Integrations
      • Azure Active Directory SSO
      • Duo SSO
      • G Suite SSO
      • Okta SSO
        • Okta SCIM
      • OneLogin SSO
      • Generic SSO
    • Panther Audit Logs
      • Querying and Writing Detections for Panther Audit Logs
      • Panther Audit Log Actions
    • Notifications and Errors (Beta)
      • System Errors
    • Panther Deployment Types
      • SaaS
      • Cloud Connected
        • Configuring Snowflake for Cloud Connected
        • Configuring AWS for Cloud Connected
        • Pre-Deployment Tools
      • Legacy Configurations
        • Snowflake Connected (Legacy)
        • Customer-configured Snowflake Integration (Legacy)
        • Self-Hosted Deployments (Legacy)
          • Runtime Environment
  • Panther Developer Workflows
    • Panther Developer Workflows Overview
    • Using panther-analysis
      • Public Fork
      • Private Clone
      • Panther Analysis Tool
        • Install, Configure, and Authenticate with the Panther Analysis Tool
        • Panther Analysis Tool Commands
        • Managing Lookup Tables and Enrichment Providers with the Panther Analysis Tool
      • CI/CD for Panther Content
        • Deployment Workflows Using Panther Analysis Tool
          • Managing Panther Content via CircleCI
          • Managing Panther Content via GitHub Actions
        • Migrating to a CI/CD Workflow
    • Panther API
      • REST API (Beta)
        • Alerts
        • Alert Comments
        • API Tokens
        • Data Models
        • Globals
        • Log Sources
        • Queries
        • Roles
        • Rules
        • Scheduled Rules
        • Simple Rules
        • Policies
        • Users
      • GraphQL API
        • Alerts & Errors
        • Cloud Account Management
        • Data Lake Queries
        • Log Source Management
        • Metrics
        • Schemas
        • Token Rotation
        • User & Role Management
      • API Playground
    • Terraform
      • Managing AWS S3 Log Sources with Terraform
      • Managing HTTP Log Sources with Terraform
    • pantherlog Tool
    • Converting Sigma Rules
  • Resources
    • Help
      • Operations
      • Security and Privacy
        • Security Without AWS External ID
      • Glossary
      • Legal
    • Panther System Architecture
Powered by GitBook
On this page
  • Overview
  • How to configure the legacy customer-managed Snowflake integration

Was this helpful?

  1. System Configuration
  2. Panther Deployment Types
  3. Legacy Configurations

Customer-configured Snowflake Integration (Legacy)

PreviousSnowflake Connected (Legacy)NextSelf-Hosted Deployments (Legacy)

Last updated 1 year ago

Was this helpful?

Panther does not support this method for new accounts, and will be migrating existing customers towards one of the in the future.

Overview

In this configuration, Panther has no access and requires a Database Administrator to run commands on our behalf.

This guide assumes you already have a Snowflake instance in AWS.

Ideally, your Panther deployment and Snowflake instance are in the same AWS region. Having both Panther and Snowflake in the same region lowers latency for queries and data movement (relative to cross region communications).

Panther uses two Snowflake users/roles to access your Snowflake instance:

  1. A read only user/role for queries

  2. An admin user/role with strict permissions only to the Panther databases to create tables when new log sources are onboarded into Panther.

In Snowflake, it is possible to share table access. This allows your business data and security data to be queried in Panther (via the PANTHER_READ_ONLY role).

When you manage your own Snowflake instance, you can create tables and views with data ingested by Panther. Do not place these custom objects inside Panther databases. Unexpected tables and views will cause errors. Instead, create them in non-Panther databases, and share them with Panther.

Do not create users or any other database objects with the prefix PANTHER_.

How to configure the legacy customer-managed Snowflake integration

1. Gather configuration information from Panther

  1. Log in to the Panther Console.

  2. Click the gear icon in the upper right.

  3. In the dropdown menu, click General.

There you will find:

  • Snowflake ReadOnly Lambda Role ARN

  • Snowflake Admin Lambda Role ARN

  • Lookup Tables Lambda Role ARN

Keep these ARNs handy, we will use this later.

2. Gather configuration information from Snowflake

In order to configure Panther, you need to get the SNOWFLAKE_IAM_USER from Snowflake.

In a Snowflake SQL shell execute the below sql, replacing myaccountid with your AWS account ID and myaccountregion with the account's region:

SELECT system$get_aws_sns_iam_policy('arn:aws:sns:myaccountregion:myaccountid:panther-processed-data-notifications');

You should see a response similar to:

{
 "Version":"2012-10-17",
 "Statement":[
  {
    "Sid":"1",
    "Effect":"Allow",
    "Principal":{
       "AWS":"arn:aws:iam::87654321XXXX:user/k7m2-s-v2st0722"
    },
    "Action":["sns:Subscribe"],
    "Resource":["arn:aws:sns:us-west-1:12345678XXXX:panther-processed-data-notifications"]
  }
 ]
}

In the above example, the SNOWFLAKE_IAM_USER is the AWS attribute arn:aws:iam::87654321XXXX:user/k7m2-s-v2st0722. Keep this handy, we will use this in a later step.

3. Create the Panther databases in Snowflake

Execute in Snowflake SQL shell:

USE ROLE SYSADMIN;

---------------- databases
CREATE database IF NOT EXISTS panther_logs;
CREATE database IF NOT EXISTS panther_rule_matches;
CREATE database IF NOT EXISTS panther_rule_errors;
CREATE database IF NOT EXISTS panther_cloudsecurity;
CREATE database IF NOT EXISTS panther_monitor;
CREATE database IF NOT EXISTS panther_views;
CREATE database IF NOT EXISTS panther_stored_procedures;
CREATE database IF NOT EXISTS panther_lookups;
CREATE database IF NOT EXISTS panther_signals;

4. Create a read only role and an administrative role in Snowflake

For customers with self-hosted Snowflake deployments who are upgrading to 1.18

Self-hosted customers using Snowflake data cloud should have their Database Administrator add the following permission set, or update their automation scripts to reflect the latest version of the setup instructions:

USE ROLE SECURITYADMIN;
GRANT CREATE STAGE, CREATE PIPE ON ALL SCHEMAS IN DATABASE PANTHER_MONITOR 
  TO ROLE panther_admin_role;

NOTE: be sure to update <your warehouse> in the first line of the SQL block below to the desired Snowflake warehouse name that you wish Panther to use.

We recommend you create a dedicated Panther warehouse (e.g., PANTHER_WH), so that you can easily track costs and resize capacity independently of other Snowflake resources.

Execute in Snowflake SQL shell:

SET WAREHOUSE_NAME = '<your_warehouse>';
USE ROLE SECURITYADMIN;

--------------- create panther_readonly_role
CREATE ROLE IF NOT EXISTS panther_readonly_role;

---------------- grants for panther_readonly_role

-- warehouse
GRANT USAGE
  ON WAREHOUSE IDENTIFIER($WAREHOUSE_NAME)
  TO ROLE panther_readonly_role;

-- panther_logs
GRANT USAGE
  ON DATABASE panther_logs
  TO ROLE panther_readonly_role;
GRANT USAGE
  ON SCHEMA panther_logs.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL TABLES IN SCHEMA panther_logs.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL VIEWS IN SCHEMA panther_logs.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE TABLES IN SCHEMA panther_logs.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE VIEWS IN SCHEMA panther_logs.public
  TO ROLE panther_readonly_role;

-- panther_rule_matches
GRANT USAGE
  ON DATABASE panther_rule_matches
  TO ROLE panther_readonly_role;
GRANT USAGE
  ON SCHEMA panther_rule_matches.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL TABLES IN SCHEMA panther_rule_matches.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL VIEWS IN SCHEMA panther_rule_matches.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE TABLES IN SCHEMA panther_rule_matches.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE VIEWS IN SCHEMA panther_rule_matches.public
  TO ROLE panther_readonly_role;

-- panther_rule_errors
GRANT USAGE
  ON DATABASE panther_rule_errors
  TO ROLE panther_readonly_role;
GRANT USAGE
  ON SCHEMA panther_rule_errors.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL TABLES IN SCHEMA panther_rule_errors.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL VIEWS IN SCHEMA panther_rule_errors.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE TABLES IN SCHEMA panther_rule_errors.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE VIEWS IN SCHEMA panther_rule_errors.public
  TO ROLE panther_readonly_role;

-- panther_cloudsecurity
GRANT USAGE
  ON DATABASE panther_cloudsecurity
  TO ROLE panther_readonly_role;
GRANT USAGE
  ON SCHEMA panther_cloudsecurity.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL TABLES IN SCHEMA panther_cloudsecurity.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL VIEWS IN SCHEMA panther_cloudsecurity.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE TABLES IN SCHEMA panther_cloudsecurity.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE VIEWS IN SCHEMA panther_cloudsecurity.public
  TO ROLE panther_readonly_role;

--panther_monitor
GRANT USAGE
  ON DATABASE PANTHER_MONITOR 
  TO ROLE PANTHER_READONLY_ROLE;  
GRANT USAGE 
  ON SCHEMA PANTHER_MONITOR.PUBLIC 
  TO ROLE PANTHER_READONLY_ROLE;  
GRANT SELECT 
  ON ALL TABLES  IN SCHEMA PANTHER_MONITOR.PUBLIC 
  TO ROLE panther_readonly_role;
GRANT SELECT 
  ON ALL VIEWS   IN SCHEMA PANTHER_MONITOR.PUBLIC 
  TO ROLE panther_readonly_role;
GRANT SELECT 
  ON FUTURE TABLES  IN SCHEMA PANTHER_MONITOR.PUBLIC 
  TO ROLE panther_readonly_role;
GRANT SELECT 
  ON FUTURE VIEWS   IN SCHEMA PANTHER_MONITOR.PUBLIC 
  TO ROLE panther_readonly_role;

-- panther_views
GRANT USAGE
  ON DATABASE panther_views
  TO ROLE panther_readonly_role;
GRANT USAGE
  ON SCHEMA panther_views.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL TABLES IN SCHEMA panther_views.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL VIEWS IN SCHEMA panther_views.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE TABLES IN SCHEMA panther_views.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE VIEWS IN SCHEMA panther_views.public
  TO ROLE panther_readonly_role;

-- panther_lookups
GRANT USAGE
  ON DATABASE panther_lookups
  TO ROLE panther_readonly_role;
GRANT USAGE
  ON SCHEMA panther_lookups.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL TABLES IN SCHEMA panther_lookups.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL VIEWS IN SCHEMA panther_lookups.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE TABLES IN SCHEMA panther_lookups.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE VIEWS IN SCHEMA panther_lookups.public
  TO ROLE panther_readonly_role;
  
  -- panther_signals
GRANT USAGE
  ON DATABASE panther_signals
  TO ROLE panther_readonly_role;
GRANT USAGE
  ON SCHEMA panther_signals.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL TABLES IN SCHEMA panther_signals.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON ALL VIEWS IN SCHEMA panther_signals.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE TABLES IN SCHEMA panther_signals.public
  TO ROLE panther_readonly_role;
GRANT SELECT
  ON FUTURE VIEWS IN SCHEMA panther_signals.public
  TO ROLE panther_readonly_role;

--------------- create panther_admin_role
CREATE ROLE IF NOT EXISTS panther_admin_role;

GRANT ROLE panther_readonly_role
    TO ROLE panther_admin_role;

---------------- grants for panther_admin_role

-- panther_logs
GRANT CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE PIPE, MODIFY, ADD SEARCH OPTIMIZATION
  ON ALL SCHEMAS IN DATABASE panther_logs
  TO ROLE panther_admin_role;

-- panther_rule_matches
GRANT CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE PIPE, MODIFY, ADD SEARCH OPTIMIZATION
  ON ALL SCHEMAS IN DATABASE panther_rule_matches
  TO ROLE panther_admin_role;

-- panther_rule_errors
GRANT CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE PIPE, MODIFY, ADD SEARCH OPTIMIZATION
  ON ALL SCHEMAS IN DATABASE panther_rule_errors
  TO ROLE panther_admin_role;

-- panther_cloudsecurity
GRANT CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE PIPE, MODIFY, ADD SEARCH OPTIMIZATION
  ON ALL SCHEMAS IN DATABASE panther_cloudsecurity
  TO ROLE panther_admin_role;

-- panther_monitor
GRANT CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE PIPE, MODIFY, ADD SEARCH OPTIMIZATION
  ON ALL SCHEMAS IN DATABASE PANTHER_MONITOR 
  TO ROLE panther_admin_role;
GRANT SELECT, INSERT, UPDATE 
  ON ALL TABLES IN SCHEMA PANTHER_MONITOR.PUBLIC 
  TO ROLE PANTHER_ADMIN_ROLE;
GRANT SELECT, INSERT, UPDATE 
  ON FUTURE TABLES IN SCHEMA PANTHER_MONITOR.PUBLIC 
  TO ROLE PANTHER_ADMIN_ROLE;

-- panther_lookups
GRANT CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE PIPE, MODIFY, ADD SEARCH OPTIMIZATION, CREATE PROCEDURE, CREATE FUNCTION 
  ON ALL SCHEMAS IN DATABASE PANTHER_LOOKUPS 
  TO ROLE PANTHER_ADMIN_ROLE;
GRANT SELECT, INSERT, UPDATE 
  ON ALL TABLES IN SCHEMA PANTHER_LOOKUPS.PUBLIC 
  TO ROLE PANTHER_ADMIN_ROLE;
GRANT SELECT, INSERT, UPDATE 
  ON FUTURE TABLES IN SCHEMA PANTHER_LOOKUPS.PUBLIC 
  TO ROLE PANTHER_ADMIN_ROLE;

-- panther_signals
GRANT CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE PIPE, MODIFY, ADD SEARCH OPTIMIZATION, CREATE PROCEDURE, CREATE FUNCTION 
  ON ALL SCHEMAS IN DATABASE PANTHER_SIGNALS
  TO ROLE PANTHER_ADMIN_ROLE;
GRANT SELECT, INSERT, UPDATE 
  ON ALL TABLES IN SCHEMA PANTHER_SIGNALS.PUBLIC 
  TO ROLE PANTHER_ADMIN_ROLE;
GRANT SELECT, INSERT, UPDATE 
  ON FUTURE TABLES IN SCHEMA PANTHER_SIGNALS.PUBLIC 
  TO ROLE PANTHER_ADMIN_ROLE;

-- panther_views
GRANT CREATE VIEW, MODIFY
  ON ALL SCHEMAS IN DATABASE panther_views
  TO ROLE panther_admin_role;

-- panther_stored_procedures
GRANT USAGE ON DATABASE panther_stored_procedures
TO ROLE panther_admin_role;

GRANT CREATE PROCEDURE, CREATE FUNCTION, MODIFY, USAGE
ON ALL SCHEMAS IN DATABASE panther_stored_procedures
TO ROLE panther_admin_role;

-- this allows panther_admin_role to create a storage integration for Panther's s3 bucket
-- NOTE: this grant can be removed after Panther is initially successfully onboarded
USE ROLE ACCOUNTADMIN;

GRANT CREATE INTEGRATION ON ACCOUNT TO ROLE panther_admin_role;

-- allow access to snowflake's audit database for panther (optional)
GRANT IMPORTED PRIVILEGES ON DATABASE snowflake TO ROLE panther_readonly_role;

5. Create a read only user and an administrative user in Snowflake

NOTE: set <your_readonly_password> and <your_admin_password> below. Execute in Snowflake SQL shell:

USE ROLE SECURITYADMIN;

-- panther_readonly user
CREATE USER IF NOT EXISTS panther_readonly password='<your_readonly_password>';

GRANT ROLE panther_readonly_role
   TO USER panther_readonly;

ALTER USER panther_readonly
   SET default_role = panther_readonly_role;

-- panther_admin user
CREATE USER IF NOT EXISTS panther_admin password='<your_admin_password>';

GRANT ROLE panther_admin_role
   TO USER panther_admin;

ALTER USER panther_admin
   SET default_role = panther_admin_role;

ALTER USER PANTHER_ADMIN 
   SET TIMEZONE = 'UTC';

6. Create a stored procedure to make creating AWS Secrets easier (Optional)

Define this stored procedure that will create a JSON document you can use to copy and paste into AWS Secret Manger (saving typing). Execute in Snowflake SQL shell:

USE ROLE SYSADMIN;

CREATE or replace FUNCTION panther_stored_procedures.public.generate_secret(USN VARCHAR, PWD VARCHAR, WHS VARCHAR, HST VARCHAR)
  RETURNS OBJECT
    LANGUAGE SQL
    STRICT
    AS
  $$
  SELECT object_construct('account', current_account(),
                        'user', USN ,
                        'password', PWD ,
                        'host',TRIM(REPLACE(HST,'https://'),'/'),
                        'port','443',
                        'warehouse',WHS) AS SECRET
  $$;
  -- Customize the values here to match your password, a compute warehouse you will be using, and your hostname.
  -- The hostname is usually "<something>.snowflakecomputing.com" from the URL used to log into your cluster.
  -- SELECT panther_stored_procedures.public.generate_secret('panther_readonly','password123','COMPUTE_WH','<something>.snowflakecomputing.com');

7. Create a KMS key in your AWS account for Panther Snowflake Secrets

You will use this key to encrypt the Snowflake secrets that we will store in your AWS account as part of Step 8.

  1. Log in to your AWS account

  2. (Optional) Go to the same region that your Snowflake account is in

  3. Go to KMS service

  4. Click on Create a key

  5. Pick Symmetric for the type and click Next

  6. Set the alias to panther-secret. Click Next. On the next page Click Next (accept defaults)

  7. Click on Add another AWS Account and enter the account id where Panther is installed.

  8. Click Next and then click Finish.

8. Create a read only user AWS Secret and an administrative user AWS Secret

Repeat the process below, once for panther_readonly user and once for the panther_admin user.

  • Access the AWS Secrets Manager via the console and select Store a New Secret button on the page.

  • You will be presented with a page titled Store a new secret. Select Other type of secrets from the list of types. Specify the following key/value pairs:

Field

Description

account

The name of your Snowflake account. It can be found by executing SELECT CURRENT_ACCOUNT()

user

Snowflake user you created earlier, either panther_readonly or panther_admin

password

The Snowflake user password that you created earlier

host

This is usually <something>.snowflakecomputing.com from the URL used to log into your cluster. Remove https:// and any trailing / from the hostname.

port

Use 443 unless you have configured differently

warehouse

The name of your Snowflake active warehouse

You can enter the above by hand OR run the following command in a Snowflake SQL shell, typing in the appropriate values for the 4 specified parameters (account and port should autopopulate). Do this once for the panther_readonly user and once for the panther_admin:

SELECT panther_stored_procedures.public.generate_secret(<user>,<password>,<warehouse>,<host>);

You can then copy-paste the result into each of the 2 secrets "plaintext" editor tab.

NOTE: Check to make sure that all 6 fields (account, host, password, port, user, warehouse) are filled out and have the correct values, otherwise the Panther lambdas may encounter issues connecting to snowflake.

  • Under "Select the encryption key," select panther-secret from the dropdown.

  • Fill in the Secret key/values.

  • Click Next.

  • You will be presented with a screen asking for the name and description of the secret. Fill these in and click Next.

  • Configure how often you want AWS Secrets Manager to rotate your secret, then click Next.

  • Finally, you will be presented with an overview screen. Scroll to the bottom and click the Store button.

Update Permissions for the Secrets

We need to configure the permissions for the two Panther AWS secrets such that only the specific Panther lambdas have access to the Snowflake secret.

The Panther panther-snowflake-api will use the panther_readonly user for user queries while the panther-snowflake-admin-api will use the panther_admin user to create tables when new log sources are onboarded.

The panther-lookup-tables-api will use the the permissions to manage look up tables in Snowflake.

Go to the console and select each of the secrets you created above. On the overview screen click on the Edit Permissions button. Copy the below policy JSON, substituting the appropriate <snowflake lambda role>, either:

  • panther-snowflake-api role collected in the first step

  • panther-snowflake-admin-api role collected in the first step

Substitute <lookup tables lambda role> with the panther-lookup-tables-api role collected in the first step.

For the value of <secret ARN> use the ARN of the secret you are updating.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {"AWS": "<snowflake lambda role>" },
            "Action": "secretsmanager:GetSecretValue",
            "Resource": "<secret ARN>"
        },
        {
            "Effect": "Allow",
            "Principal": {"AWS": "<lookup tables lambda role>" },
            "Action": "secretsmanager:GetSecretValue",
            "Resource": "<secret ARN>"
        }
    ]
}

Then click Save.

Make a note of the arn for the secret. We will use this later.

9. Deploy Panther with Snowflake enabled

SaaS Customer-managed Deployment Users

Send to your Panther point of contact (POC):

  • SNOWFLAKE_IAM_USER collected in the first step

  • ARN for the panther_readonly user AWS Secret

  • ARN for the panther_admin user AWS Secret

Your Panther POC will re-deploy Panther with these settings to enable Snowflake.

CloudPrem Users

Customers running Panther in their own accounts (we call that CloudPrem) need to first deploy the master template doing an initial setup of Panther. After deploying the master template configure the master stack parameters as below:

  • update: SnowflakeAPISecretARN parameter as the ARN of the secret created above for the panther_readonly user.

  • update: SnowflakeAdminAPISecretARN parameter as the ARN of the secret created above for the panther_admin user.

  • update: SnowflakeDestinationClusterARNs parameter as the value of <SNOWFLAKE_IAM_USER> from initial step above.

Execute an update to the Cloudformation stack.

Validation of Snowpipe Processing

Once Panther is configured for Snowflake, you should have seven databases:

  • panther_logs

  • panther_rule_matches

  • panther_rule_errors

  • panther_cloudsecurity

  • panther_views

  • pather_stored_procedures

  • panther_monitor

These are the same database names used in AWS Athena and queries should behave similarly.

Assuming you have data being regularly being processed, there should be data in the tables in a few minutes. This depends on your rate of log ingestion.

You can quickly test if the data ingestion is working by running a simple query:

SELECT count(1) AS c FROM panther_views.public.all_logs ;

Rotating Secrets

To rotate secrets, create a NEW user and edit the secret replacing the old user and password with the new user and password. Wait one hour before deleting/disabling the old user in Snowflake.

You will use to store the Snowflake user password. It will be configured to only allow access from a single lambda function in the Panther account.

The configuration can be tested from the . Run some same queries over a table that you know has data (check via Snowflake console).

supported methods
AWS Secrets Manager
Data Explorer
In the Panther Console, the General Settings page is open. The Snowflake Settings tab is selected. The screen shows a list of Snowflake configuration ARNs.
On the "Store a new secret" page in AWS, the secret name and description fields are filled out.
The image shows the AWS Console during the process of storing a new secret. Under "Configure automatic rotation," the options available are "Disable automatic rotation" and "Enable automatic rotation."
The image shows the "Store a new secret" screen from the AWS console. The option "Other type of secrets" is selected. The dropdown for "Select the encryption key" is set to "panther-secret."
On the "Store a new secret" page in AWS, the secret type "Other types of secrets" is selected. Under "Specify the key/value pairs to be stored in this secret," the following keys are entered: account, host, password, port, user, and warehouse.