Skip to content
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

[NEOS-924] Update mysql connection validation #1646

Open
evisdrenova opened this issue Mar 26, 2024 · 0 comments
Open

[NEOS-924] Update mysql connection validation #1646

evisdrenova opened this issue Mar 26, 2024 · 0 comments
Labels
Improvement Created by Linear-GitHub Sync

Comments

@evisdrenova
Copy link
Contributor

evisdrenova commented Mar 26, 2024

mysql handles user grants and permissions differently than postgres so we'll need to implement this differently.

mysql has a table called - information_schema.table_privileges this holds all of the table privileges that the user has. The problem is that this table only shows explicit privileges. I.e. privileges that have been granted to the user via grant SELECT, INSERT, etc. on <schema>.<table> to <user>. It does not show inherited privileges.

We can also run show grants <user> to see what grants a specific user has. This will return something like:

GRANT SELECT, INSERT, UPDATE, DELETE ON . TO evis@%

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ON user.* TO evis@%

GRANT SELECT ON user.testtable TO evis@%

In order to understand that tables a user has access to, we'd need to parse this table and understand the grants and then match that against the tables that we see in information_schema.tables to return the databases and tables that the user has access to.

Once we have all of this, we can then pipe this into the <Permissions /> component on the front end and render it there. Refer to the <Postgres /> component to see how we render this on the front.

From SyncLinear.com | NEOS-924

@evisdrenova evisdrenova added the Improvement Created by Linear-GitHub Sync label Mar 26, 2024
@evisdrenova evisdrenova added this to the v.17 milestone Apr 8, 2024
@evisdrenova evisdrenova removed this from the v.17 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

1 participant