-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Snowflake: Support optional scope in OAuth token request #58871
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
Snowflake: Support optional scope in OAuth token request #58871
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
a5e617d to
47fcbea
Compare
Omit scope field when unset instead of defaulting to None, and add tests for scoped and unscoped OAuth requests Fix SnowflakeHook OAuth tests to correctly handle client_credentials flow Docs: Add ``scope`` parameter description for OAuth in SnowflakeHook Fixed tests to ensure client_credentials code path is tested instead of refresh token Fixed formatting issues and removed extraneous comments
47fcbea to
2e8366a
Compare
|
i think there is another pr for the same thing? #58863 |
Please see my comment on the existing issue. |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Omit scope field when unset instead of defaulting to None, and add tests for scoped and unscoped OAuth requests Fix SnowflakeHook OAuth tests to correctly handle client_credentials flow Docs: Add ``scope`` parameter description for OAuth in SnowflakeHook Fixed tests to ensure client_credentials code path is tested instead of refresh token Fixed formatting issues and removed extraneous comments Co-authored-by: Sameer Mesiah <smesiah971@gmail.com>
Omit scope field when unset instead of defaulting to None, and add tests for scoped and unscoped OAuth requests Fix SnowflakeHook OAuth tests to correctly handle client_credentials flow Docs: Add ``scope`` parameter description for OAuth in SnowflakeHook Fixed tests to ensure client_credentials code path is tested instead of refresh token Fixed formatting issues and removed extraneous comments Co-authored-by: Sameer Mesiah <smesiah971@gmail.com>
Omit scope field when unset instead of defaulting to None, and add tests for scoped and unscoped OAuth requests Fix SnowflakeHook OAuth tests to correctly handle client_credentials flow Docs: Add ``scope`` parameter description for OAuth in SnowflakeHook Fixed tests to ensure client_credentials code path is tested instead of refresh token Fixed formatting issues and removed extraneous comments Co-authored-by: Sameer Mesiah <smesiah971@gmail.com>
Summary
This PR adds support for the OAuth
scopeparameter in theSnowflakeHookand adds the associated OAuth tests to correctly validate both scoped and unscoped token requests. Previously, the scope value was not included in the Snowflake OAuth token request.Details
Ensures consistent handling of the scope parameter across all OAuth grant types. Adds test that reflect the real execution path.
Notes
Although the original issue focused on adding scope support for the
client_credentialsgrant type, scope can also be optionally included when using therefresh_tokenOAuth flow. This PR provides a general implementation that supports both.Closes: #58815