Connecting Honeycomb Maps to Snowflake
Honeycomb Maps supports connecting to Snowflake using multiple authentication methods.
TIP
If you install the Honeycomb Maps App from Snowflake Marketplace, the connection to Snowflake is pre-configured.
Snowflake OAuth
The user is redirected to a Snowflake window (the 'Consent Screen'), asked to sign in if they aren't already, and then is asked to allow Honeycomb Maps to connect to Snowflake. Queries are run as the end user, preserving existing RBAC controls.
In this model, Snowflake serves as the Identity Provider (IdP) for an OAuth 2.0 Authentication Code Flow process. Honeycomb Maps acts as the client.
Snowflake-provided documentation: https://docs.snowflake.com/en/user-guide/oauth-snowflake-overview
Programmatic Access Tokens (PAT)
An admin creates a PAT, and saves it to Honeycomb. Honeycomb includes this token with requests to Snowflake.
- User-independent
External OAuth
In this model, the user is redirected to the external IdP (such as Okta) to log in. If they already have a session, this may be skipped. Honeycomb Maps then presents an identity token (JWT) issued by the IdP to Snowflake when requesting data. Queries are run as the end user, preserving existing RBAC controls.
An external identity provider (IdP), such as Okta, serves as the Authorization Server. Snowflake serves as the resource server. Use the Snowflake OAuth instructions to configure this method.
Snowflake-provided documentation: https://docs.snowflake.com/en/user-guide/oauth-ext-overview
Workload identity federation
Honeycomb Maps retrieves a signed JWT from the cloud provider it is running on (AWS, GCP, Azure), attesting to its identity. This is then passed to Snowflake as a connection parameter. Snowflake validates the token, proving that the application is running on trusted infrastructure. Queries are run as a service user.
TIP
Workload Identity Federation is only available when Honeycomb Maps is self-hosted. Contact hello@honeycombmaps.com for more information.
Snowflake-provided documentation: https://docs.snowflake.com/en/user-guide/workload-identity-federation
Connecting to Snowflake with Snowflake OAuth
Honeycomb Maps supports connecting to Snowflake using Snowflake OAuth. Snowflake OAuth is a user-based authentication method, meaning it requires the identity of the end user. That means that maps that use data from Snowflake OAuth connections can't be shared publicly. However, maps can be shared within an organization (business plans only), with each user querying Snowflake as their own identity.
You can read more about Snowflake OAuth on Snowflake's documentation page: https://docs.snowflake.com/en/user-guide/oauth-custom
There are two steps to setting up a Snowflake OAuth connection:
- Create an OAuth integration in Snowflake
- Set up a connection in Honeycomb Maps
In Snowflake, create a Snowflake OAuth integration using CREATE SECURITY INTEGRATION.
CREATE OR REPLACE SECURITY INTEGRATION OAUTH_HONEYCOMB_MAPS_INTEGRATION
TYPE = OAUTH
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'https://app.honeycombmaps.com/api/oauth/callback'
ENABLED = TRUE
OAUTH_ENFORCE_PKCE = TRUE
ALLOWED_ROLES_LIST = ('READ_TEST_DATA') -- Insert the roles that should be able to be used here
OAUTH_ISSUE_REFRESH_TOKENS = TRUE;
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('OAUTH_HONEYCOMB_MAPS_INTEGRATION');In Honeycomb Maps, create a connection
- Log into Honeycomb Maps at app.honeycombmaps.com, or your custom business URL.
- Go to the 'Connections' page. If you are using the business version of Honeycomb Maps you must be a Honeycomb Maps Admin to configure connections.
- Click on 'Set up a new connection', then click on 'Snowflake'. For 'Authentication method', select 'SNOWFLAKE_OAUTH'.


Fill in the following fields. You will need to get some information from Snowflake.
| Field | Required for Snowflake OAuth | Details |
|---|---|---|
| Connection Name | Yes | User-facing name for the connection. |
| Account Identifier | Yes | You can find your Snowflake account identifier in the bottom-left corner of the Snowsight web interface by clicking your account name and selecting Connect a tool to Snowflake. |
| Host | No | Leave blank. |
| Warehouse | Yes | The name of the Snowflake warehouse that should be used when Honeycomb Maps fetches data. |
| Database | No | The default Snowflake database that Honeycomb Maps should use. |
| Schema | No | Optional. |
| Role | No | The role that should be used when connecting. The user authenticating must have this role. |
| OAuth Client ID | Yes | Get this from running SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('OAUTH_HONEYCOMB_MAPS_INTEGRATION');. |
| OAuth Client Secret | Yes | Get this from running SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('OAUTH_HONEYCOMB_MAPS_INTEGRATION'); (two secrets will be shown, you only need to use one). |
| OAuth Authorization URL | Yes | Get this from running DESCRIBE INTEGRATION <integration_name>. It will be in the format https://myorg-account_xyz.snowflakecomputing.com/oauth/authorize. |
| OAuth Token URL | Yes | Get this from running DESCRIBE INTEGRATION <integration_name>. It will be in the format https://myorg-account_xyz.snowflakecomputing.com/oauth/token-request. |
| OAuth Scopes | Yes | refresh_token must be present. session:role:ROLE_NAME can be included to scope the integration for a specific role. |
- Click on 'Save Connection'. After a moment, you should see the connection details, with the Status showing as 'Error - You have not connected your account to this connection'. This is expected.

Click on the 'Connect' button on the left side at the bottom of the page. This will redirect you to Snowflake to log in and approve the connection.
You should be redirected back to Honeycomb Maps, and the connection should now show as 'Connected'.
Now that the connection is active, the next step is to create a data source that uses this connection. Click on 'Data Sources' on the left sidebar, then on 'Add a new data source'. Select the connection you just configured, then enter a SQL query that will be used to fetch data from Snowflake.
Connecting to Snowflake with a Programmatic Access Token (PAT)
Honeycomb Maps can authenticate to Snowflake using a Programmatic Access Token (PAT). In this model, you generate a token in Snowflake, and then save it as part of the connection settings in Honeycomb Maps. When Honeycomb Maps connects to Snowflake (for example, when loading data for a map), it presents the saved token (PAT) to show that it is allowed to access data.
Programmatic Access Tokens are a user-independent form of authentication, because they do not verify or depend on the identity of the end user. Multiple users, or public users for a shared map, may use a connection that uses one PAT.
There are two steps to set this up:
- Create a programmatic access token (PAT) within Snowflake
- Configure a connection in Honeycomb Maps that uses the PAT
Creating a PAT in Snowflake
First, you will need to create a Programmatic Access Token within Snowflake. Snowflake has detailed documentation here: https://docs.snowflake.com/en/user-guide/programmatic-access-tokens.
This will involve:
- Creating a service user
- Creating a network policy that restricts access to Honeycomb Maps' published IP -
54.198.161.240 - Attach the network policy to the user
- Grant a role to the service user, allowing them to view data
- Generate the programmatic access token
Here are example SQL commands
-- Create a service user and generate a PAT for them
-- ============================================
-- 1. Create the user
-- ============================================
CREATE USER IF NOT EXISTS honeycomb_maps_service_user
TYPE = SERVICE -- use SERVICE for an app/service account (not a human login)
DEFAULT_ROLE = READ_TEST_DATA
COMMENT = 'Service user for Honeycomb Maps application';
-- ============================================
-- 2. Create (or reuse) a network policy
-- Restrict to the published IP address that Honeycomb Maps uses
-- ============================================
CREATE NETWORK POLICY IF NOT EXISTS honeycomb_maps_network_policy
ALLOWED_IP_LIST = ('54.198.161.240')
COMMENT = 'Restricts honeycomb_maps_service_user to known IP';
-- Attach the policy to the user
ALTER USER honeycomb_maps_service_user SET NETWORK_POLICY = honeycomb_maps_network_policy;
-- ============================================
-- 3. Grant a role to the Honeycomb Maps service user, so it can read data.
-- This role should be tightly scoped with minimum permissions required.
-- ============================================
GRANT ROLE [insert role name here] TO USER honeycomb_maps_service_user;
-- ============================================
-- 4. Generate the programmatic access token
-- ============================================
ALTER USER IF EXISTS honeycomb_maps_service_user
ADD PROGRAMMATIC ACCESS TOKEN honeycomb_maps_access_token
ROLE_RESTRICTION = 'READ_TEST_DATA'
DAYS_TO_EXPIRY = 365
COMMENT = 'Token for Honeycomb Maps to access Snowflake';Configure a connection in Honeycomb Maps
- Log into Honeycomb Maps at app.honeycombmaps.com, or your custom business URL.
- Go to the 'Connections' page. If you are using the business version of Honeycomb Maps you must be a Honeycomb Maps Admin to configure connections.
- Click on 'Set up a new connection', then click on 'Snowflake'. For 'Authentication method', select 'PAT'.


Fill in the following information:
| Field | Required for PAT Authentication | Details |
|---|---|---|
| Connection Name | Yes | A descriptive name for the connection. It will be shown to users within your organization. |
| Account Identifier | Yes | You can find your Snowflake account identifier in the bottom-left corner of the Snowsight web interface by clicking your account name and selecting Connect a tool to Snowflake. |
| Warehouse | Yes | The name of the Snowflake warehouse that should be used when Honeycomb Maps fetches data. |
| Database | No | The default Snowflake database that Honeycomb Maps should use. |
| Schema | No | The default Snowflake schema that Honeycomb Maps should use. |
| Role | No | The role that should be used when connecting. The role must be granted to the service user. |
| User | Yes | The name of the user the PAT was issued for. |
| Programmatic Access Token | Yes | Copy and paste this from Snowflake. |
- Click on 'Save Connection'. After a moment, you should see the connection details, with the Status showing as 'Connected'. If there was an error connecting to Snowflake, it will be shown under 'Status'.

- Now that the connection is active, the next step is to create a data source that uses this connection. Click on 'Data Sources' on the left sidebar, then on 'Add a new data source'. Select the connection you just configured, then enter a SQL query that will be used to fetch data from Snowflake.