Re: Filtering DatabaseMetaData to show only the items for which the current user has access

From: danap <danap(at)itstriangle(dot)com>
To: slangley(at)scharp(dot)org, PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Filtering DatabaseMetaData to show only the items for which the current user has access
Date: 2016-09-13 00:51:10
Message-ID: 57D74D7E.8070907@itstriangle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Langley, Scott E wrote:
> Hello PostgreSQL JDBC Developers,
>
> We have a desire to hide unneeded database objects from our database-challenged
> users - as they might see in a simple database viewer application - by removing
> their privileges on such objects.
>
> It appears that many database viewing applications, e.g., DbVisualizer, rely on
> what is returned by the JDBC driver’s DatabaseMetaData methods to determine
> which schemas and tables to display to the user:
>
> ~
> ~
> ~
>
> If you would accept a patch along these lines, which approach would be preferable?
>
> Thanks for your consideration.
> Scott Langley

Seems what you are asking the JDBC driver to do is the work of what
should be done by a client application. Yes MySQL does offer this
more advanced control of users.

Most of this can be accomplished as indicated, filtering through the
DatabaseMetaData.getTables(catalog, schemaPattern, tableNamePattern,
tableTypes)

MyJSQLView does exactly this and some basic filtering can be accomplished
via a configuration file, myjsqlview.conf. If not edit the DatabaseProperties
Java code to only allow, the particular aspects desired. This might be much
easier then editing the JDBC code to add this feature.

Overall seems the additional control should be requested via the server
features.

danap
http://myjsqlview.com

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message danap 2016-09-13 01:01:29 MyJSQLView Version 7.08 Released
Previous Message Langley, Scott E 2016-09-12 23:54:20 Filtering DatabaseMetaData to show only the items for which the current user has access