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

JDBC Connection via user voc produces errors when fetching certain meta data information #6388

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2017-08-10 17:43:53 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: Martin van Dinther <<martin.van.dinther>>
Version: 11.27.5 (Jul2017-SP1)

Last updated: 2017-10-26 15:44:56 +0200

Comment 25564

Date: 2017-08-10 17:43:53 +0200
From: Martin van Dinther <<martin.van.dinther>>

User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Build Identifier:

Fetching meta data from a JDBC connection which is not from user monetdb (or has monetdb privileges granted) fails for following MonetDatabaseMetaData methods:
getUserName()
getMaxConnections()
getDatabaseProductVersion()
getDatabaseMajorVersion()
getDatabaseMinorVersion()
with eror:
SELECT: access denied for voc to table 'sys.environment'
and for:
getTables()
getTableTypes()
with eror:
SELECT: access denied for voc to table 'sys.table_types'

Reproducible: Always

Steps to Reproduce:

  1. connect as monetdb user
  2. create voc user and schema as listed at https://www.monetdb.org/Documentation/UserGuide/Tutorial
    CREATE USER "voc" WITH PASSWORD 'voc' NAME 'VOC Explorer' SCHEMA "sys";
    CREATE SCHEMA "voc" AUTHORIZATION "voc";
    ALTER USER "voc" SET SCHEMA "voc";
  3. connect as voc user
  4. call DatabaseMetaData methods:
    getUserName()
    getMaxConnections()
    getDatabaseProductVersion()
    getDatabaseMajorVersion()
    getDatabaseMinorVersion()
    getTables()
    getTableTypes()

Actual Results:

SQLException errors:
SELECT: access denied for voc to table 'sys.environment'
and
SELECT: access denied for voc to table 'sys.table_types'

Expected Results:

no errors

This issue was reported by Sandy on MonetDB users-list on 24-06-2017 01:46 with subject "Setting Up Tools"
See: https://www.monetdb.org/pipermail/users-list/2017-June/009837.html

Comment 25565

Date: 2017-08-10 18:10:52 +0200
From: MonetDB Mercurial Repository <>

Changeset 8b40a845240c, made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the monetdb-java repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=8b40a845240c

Changeset description:

Added test program for Bug #6388
and a fix for calling metadata methods:
 getUserName()
 getMaxConnections()
 getDatabaseProductVersion()
 getDatabaseMajorVersion()
 getDatabaseMinorVersion()
ToDo: for calling
 getTables()
 getTableTypes()
we need to do changes in monetdb server code.

Comment 25566

Date: 2017-08-10 18:12:49 +0200
From: MonetDB Mercurial Repository <>

Changeset f9f9e4953d89 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=f9f9e4953d89

Changeset description:

Activating JDBC test for bug #6388.

Comment 25588

Date: 2017-08-17 18:18:06 +0200
From: MonetDB Mercurial Repository <>

Changeset 49d4903a4dff made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=49d4903a4dff

Changeset description:

Added GRANT SELECT TO PUBLIC for 8 system tables and 1 system view
and GRANT EXECUTE for 1 system function.
This solves issue reported in bug #6388.

Comment 25812

Date: 2017-10-26 15:44:56 +0200
From: Martin van Dinther <<martin.van.dinther>>

New JDBC driver monetdb-jdbc-2.27.jar has been released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant