codeant-ai-for-open-source[bot] commented on code in PR #36856:
URL: https://github.com/apache/superset/pull/36856#discussion_r3686029936
##########
superset/db_engine_specs/snowflake.py:
##########
@@ -440,6 +605,18 @@ def update_params_from_encrypted_extra(
database: "Database",
params: dict[str, Any],
) -> None:
+ # To use OAuth authentication, a database connection must first be
created using
+ # another authenticator (typically key-pair authentication)
+ # with “Impersonate logged in user” enabled.
+ # Key-pair authentication is used for connection tests,
+ # while OAuth authentication is used when executing actual queries,
+ # such as in SQL Lab or dashboards.
+ # Therefore, when using OAuth authentication, the key-pair
authentication
+ # settings are not loaded, and the connection is established using
OAuth only.
+ connect_args: dict[str, Any] = params.get("connect_args") or {}
+ if connect_args.get("authenticator") == "oauth":
+ return
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> When reviewing Snowflake authentication parameter loading, account for
impersonate_user setting connect_args["authenticator"] to "oauth" before
encrypted-extra loading; do not require this function to inspect the SQLAlchemy
URL query string.
**Applied to:**
- `superset/db_engine_specs/snowflake.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]