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

SHOW DICTIONARIES privilege does not work as expected #64364

Open
alsugiliazova opened this issue May 24, 2024 · 0 comments
Open

SHOW DICTIONARIES privilege does not work as expected #64364

alsugiliazova opened this issue May 24, 2024 · 0 comments

Comments

@alsugiliazova
Copy link

alsugiliazova commented May 24, 2024

ClickHouse server version 24.4.1

defaults user:

CREATE USER user1;

CREATE DICTIONARY dict
(
    `x` Int32,
    `y` Int32
)
PRIMARY KEY x
SOURCE(CLICKHOUSE())
LIFETIME(MIN 0 MAX 0)
LAYOUT(FLAT());

GRANT SHOW DICTIONARIES ON dict TO user1;
GRANT SELECT ON system.dictionaries TO user1;
SHOW GRANTS FOR user1;
1. GRANT SHOW DICTIONARIES ON default.dict TO user1 
2. GRANT SELECT ON system.dictionaries TO user1     
SELECT name
FROM system.dictionaries
   ┌─name─┐
1. │ dict │
   └──────┘

1 row in set. Elapsed: 0.001 sec. 
SHOW DICTIONARIES
   ┌─name─┐
1. │ dict │
   └──────┘

1 row in set. Elapsed: 0.001 sec. 

user1:

SHOW DICTIONARIES
0 rows in set. Elapsed: 0.001 sec.
SHOW CREATE DICTIONARY dict
CREATE DICTIONARY default.dict
(
    `x` Int32,
    `y` Int32
)
PRIMARY KEY x
SOURCE(CLICKHOUSE())
LIFETIME(MIN 0 MAX 0)
LAYOUT(FLAT()) 
EXISTS dict
Code: 497. DB::Exception: Received from localhost:9000. DB::Exception: user1: Not enough privileges. To execute this query, it's necessary to have the grant SHOW TABLES ON default.dict. (ACCESS_DENIED)
SELECT name
FROM system.dictionaries
0 rows in set. Elapsed: 0.001 sec. 

According to docs, SHOW DICTIONARIES is enough for using EXISTS dictionary.
Why I do not see dictionary when I use SHOW DICTIONARIES?
Why I do not see anything in system.dictionaries?

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

No branches or pull requests

1 participant