Hello,
We are currently using metabase 0.44, self hosted. It connects to our Redshift cluster. The db user configured for the database is a programmatically configured user, which defines access to various tables and schemas.
The challenge we are meeting is that it loads tables and fields for inaccessible objects (tables and views). I have tried browsing through the metabase repository to understand exactly how metabase enumerates tables and fields, but I am unable to find it.
When I as the metabase db user issue i.e. this SQL:
select table_schema, table_name, column_name, data_type as type_name
from information_schema.columns
where table_schema not like 'pg_%'
and table_schema not like 'information_schema'
I only see the correct tables and columns, which have been granted access to.
I am very curious to understand which tables metabase enumerates from, as in Redshift this seems to violate the granted access.
The main challenge this causes for us is that users are able to find tables which doesn't work, because we don't want to give access to it, and it also pollutes the available models / tables a lot.
{
"browser-info": {
"language": "en-GB",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.16+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.16",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.16+8",
"os.name": "Linux",
"os.version": "4.14.281-212.502.amzn2.x86_64",
"user.language": "en",
"user.timezone": "Europe/Berlin"
},
"metabase-info": {
"databases": [
"redshift",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "13.4"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.3.5"
}
},
"run-mode": "prod",
"version": {
"date": "2022-08-04",
"tag": "v0.44.0",
"branch": "release-x.44.x",
"hash": "d3700f5"
},
"settings": {
"report-timezone": null
}
}
}
Best Regards,
Jørgen