Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snowflake): support oauth authentication #236

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shekhar-rudder
Copy link
Member

Description

This PR adds support for oauth authentication is snowflake.

  • For backward compatibility, the default value of Authenticator is AuthTypeSnowflake. If the client provides its value, it will be overridden
  • Added Host and Token fields in snowflake config

Linear Ticket

< Replace_with_Linear_Link >

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@@ -34,11 +34,19 @@ type Config struct {
KeepSessionAlive bool `json:"keepSessionAlive"`
UseLegacyMappings bool `json:"useLegacyMappings"`
QueryTag string `json:"queryTag"`
Host string `json:"host"`
Token string `json:"token"`
Authenticator gosnowflake.AuthType `json:"authenticator"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other type of authenticators do we need to support? Would it be possible to run all scenarios for this new auth method here too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just need support for oauth authentication. I can check if there is an API to generate oauth tokens

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the existing UseKeyPairAuth pattern, we could do the following for more predictable results:

UseOAuth bool
OAuthToken string

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

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.

3 participants