codeant-ai-for-open-source[bot] commented on code in PR #36856:
URL: https://github.com/apache/superset/pull/36856#discussion_r3651356811
##########
superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx:
##########
@@ -522,7 +522,7 @@ const ExtraOptions = ({
onChange={onInputChange}
>
{t(
- 'Impersonate logged in user (Presto, Trino, Drill, Hive,
and Google Sheets)',
+ 'Impersonate logged in user (Presto, Trino, Drill, Hive,
Snowflake and Google Sheets)',
Review Comment:
**Suggestion:** The UI now advertises Snowflake OAuth impersonation, but
this change does not disable the per-user caching option for OAuth-enabled
connections. Leaving that option selectable allows users to configure a shared
cache for credentials that must remain user-scoped, potentially reusing one
user's connection for another user. [security]
<details>
<summary><b>Severity Level:</b> Critical 🚨</summary>
```mdx
- ❌ SQL Lab results may cross user boundaries.
- ❌ Dashboard results may expose another user's data.
- ⚠️ Snowflake OAuth authorization becomes ineffective for cached queries.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. In the database configuration UI, enable the `impersonate_user` checkbox
rendered by
`ExtraOptions.tsx:517-526`, configure Snowflake OAuth, and leave the existing
username-aware caching option disabled.
2. Log in as user A and execute a query from SQL Lab; the Snowflake
connection path
invokes `SnowflakeEngineSpec.impersonate_user()` at
`superset/db_engine_specs/snowflake.py:278-319`, which enables OAuth and
attaches user A's
token.
3. Execute the same query as user B through the SQL Lab or dashboard query
path while
result caching is enabled.
4. Because the database remains configured for shared caching rather than
user-specific
caching, the identical cache key can return user A's cached result to user B
instead of
executing with user B's OAuth identity.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=dc52940c2bc049b6af7028888548fa8d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=dc52940c2bc049b6af7028888548fa8d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx
**Line:** 525:525
**Comment:**
*Security: The UI now advertises Snowflake OAuth impersonation, but
this change does not disable the per-user caching option for OAuth-enabled
connections. Leaving that option selectable allows users to configure a shared
cache for credentials that must remain user-scoped, potentially reusing one
user's connection for another user.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F36856&comment_hash=68d161fe6a9068153c9e123953acbf809990b35746b0f58e94e8833c2c47d5c5&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F36856&comment_hash=68d161fe6a9068153c9e123953acbf809990b35746b0f58e94e8833c2c47d5c5&reaction=dislike'>👎</a>
--
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]