Skip to content

fix: Hide Token Auth for Snowflake endpoints#3459

Draft
zackverham wants to merge 5 commits intomainfrom
fix/remove-token-auth-snowflake
Draft

fix: Hide Token Auth for Snowflake endpoints#3459
zackverham wants to merge 5 commits intomainfrom
fix/remove-token-auth-snowflake

Conversation

@zackverham
Copy link
Collaborator

When creating a credential for Connect inside Snowflake, Token Authentication doesn't work - only API Key and Snowflake Connection work. This change modifies the auth method selection to show different options based on the server type:

  • For Connect URLs: Token Authentication (Recommended), API Key
  • For Snowflake URLs: Snowflake Connection, API Key (no Token Auth)

Fixes #3226

Intent

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

User Impact

Automated Tests

Directions for Reviewers

Checklist

  • I have updated the root CHANGELOG.md to cover notable changes.

zackverham and others added 5 commits February 6, 2026 10:26
When creating a credential for Connect inside Snowflake, Token
Authentication doesn't work - only API Key and Snowflake Connection
work. This change modifies the auth method selection to show different
options based on the server type:

- For Connect URLs: Token Authentication (Recommended), API Key
- For Snowflake URLs: Snowflake Connection, API Key (no Token Auth)

Fixes #3226

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Export AuthMethod, AuthMethodName, and getAuthMethod for testing
- Add tests for getAuthMethod covering all three auth methods
- Add tests for AuthMethod and AuthMethodName enum values
- Create multiStepHelpers.test.ts with tests for server type helpers
  (isConnect, isSnowflake, isConnectCloud) and type conversion helpers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enhance the "New PCS Credential" test to explicitly verify that:
- Exactly 2 auth method options are shown
- First option is "Token Authentication" with "Recommended" label
- Second option is "API Key"

Added a note that Snowflake endpoints show different options
(Snowflake Connection + API Key, no Token Auth) but cannot be
E2E tested without Snowflake infrastructure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous fix only hid Token Auth when the URL matched Snowflake
patterns (*.snowflakecomputing.app). However, users inside Snowflake
often use internal URLs like https://connect/ which don't match those
patterns, causing Token Auth to still appear even though it won't work.

This change adds detection of Snowflake environment by checking if
Snowflake connections are configured on the system. When connections
exist (from connections.toml, config.toml, or environment variables),
we're inside Snowflake and Token Auth should be hidden.

Backend changes:
- Add hasSnowflakeConnections field to test-credentials API response
- Check for Snowflake connections when validating credentials

Frontend changes:
- Update TestResult type to include hasSnowflakeConnections
- Hide Token Auth when hasSnowflakeConnections is true OR URL is Snowflake

Fixes #3226

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Token Auth method when URL is Snowflake endpoint

1 participant