Bug description

Want to access two schema/database information using on database connection in superset if database/schema coming from starrock query eng.ine.

consider: I have external catalog cat1. and i have 3 database in that db1,db2,db3 i have created one user who will have access two db1 and db2 then how can i make sure in superset also he can access both database using one database connection.

if i use root user for superset connection then i able to get all three database. But and to create user1 who can access db1 and db2 only

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

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).

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). 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.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

Comment From: hainenber

Dosu's response is reasonable to me. Please follow up to see if it works out for your case :D

Comment From: rusackas

Moving this to a Q&A discussion, since it sounds like help is needed, and this is not a bug being reported.