[MySQL] NocoDB running into problems on tables where a user does not have SELECT privilege for a column #8271
DierkDroth
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is an existing MySQL database where some tables hold sensitive data (like credentials) which should not be exposed to the user which connects to the MySQL DB by using NocoDB. Therefore the user does not have SELECT permission for those columns. Queries on those tables always result in an error.
I tried to workaround by creating a view which only would hold the 'accessible' columns. Unfortunately this still is causing problems due to 'SELECT' statements which are fired by NocoDB when creating the (Grid) view.
This is a NocoBD generated query on the
MailAccount
table (where the user has the necessary entitlements forEmail
andId
).select * from (select `__nc_root`.`Email` as `ce3wh9aqumh1cvl`, `__nc_root`.`Id` as `cqvp1w4fmxi4jn4`, (select count(`Id`) as `count` from `MailAccount`) as `__nc_count` from (select * from `MailAccount` order by `Id` asc limit 25 offset 0) as `__nc_root`) __nc_alias
However, due to the
SELECT *
parts of the query it will fail with errorSELECT command denied to user '_cWkqYuA8ftBok16WAuttBljcPzC5mTY'@'10.1.0.146' for table 'MailAccount'
Is there any chance this issue could be addressed by the NocoDB team, so only columns which are 'parts of the view' would be queried?
Is there any other workaround I could try?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions