Open huw0 opened 4 months ago
I've raised a PR for the simplest of these changes in UseTask
. The changes for StatementAnalyzer
are quite extensive, so I'd prefer that this is looked at by someone who is more familiar with the Trino internals.
cc: @dain @kokosing
Where a user does have access to the underlying database, but shouldn't have access in Trino then the error returned is that the table does not exist, rather than access is denied. This means a user can determine database objects that exist but are not visible to them.
I did not understand this. Doesn't throwing "table does not exist" actually prevent someone from enumerating which objects exist which he simply doesn't have access to? If the error was "access is denied" wouldn't they know the existence of the object?
I don't know how @dain considers "leaking existence or absence of object" from security standpoint though.
I've noticed that Trino often checks database metadata before access control.
This means that when a query is made against an object that the user does not have permission for:
Configure a catalog that not visible to a user. The following queries result in database calls showing the issues listed above:
This is not an exhaustive list.
Suggested fixes...
StatementAnalyzer
.