dosubot[bot] commented on issue #33901:
URL: https://github.com/apache/superset/issues/33901#issuecomment-3004229050

   <!-- Answer -->
   Superset shows only the databases and schemas that the StarRocks user (in 
your connection string) has permission to access. If you connect Superset using 
user1, and user1 only has access to db1 and db2 in StarRocks, then only those 
databases will be visible and accessible in Superset—db3 will not appear. There 
is no extra configuration needed in Superset for this; it relies entirely on 
the permissions of the StarRocks user you use for the connection. This is 
handled by the StarRocks engine spec in Superset, which uses the user’s 
privileges to discover available databases and schemas 
([source](https://github.com/apache/superset/blob/6876a1e6843cd1f28f4206ca2dd75342dfddcf26/superset/db_engine_specs/starrocks.py)).
   
   If you need more advanced control (like switching credentials based on 
Superset roles), you can use the `DB_CONNECTION_MUTATOR` function in your 
Superset config to dynamically change the connection details based on the 
logged-in user or their roles 
([discussion](https://github.com/apache/superset/discussions/32818)). But for 
your scenario, just ensure user1 in StarRocks has access only to db1 and db2, 
and use user1’s credentials in your Superset database connection.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33901)


-- 
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]

Reply via email to