You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DROP TABLE events_mv;
DROP TABLE materialized_events;
DROP TABLE session_events;
CREATE TABLE session_events(
clientId UUID,
sessionId UUID,
pageId UUID,
timestamp DateTime,
type String
) ORDER BY (timestamp);
CREATE MATERIALIZED VIEW events_mv
TO materialized_events
AS SELECT
clientId,
sessionId,
pageId,
timestamp,
type
FROM session_events;
CREATE TABLE materialized_events(
clientId UUID,
sessionId UUID,
pageId UUID,
timestamp DateTime,
type String
) ORDER BY (timestamp);
The minimum set of permission you currently need for a user to insert into the table:
DROP USER user_1;
CREATE USER user_1 IDENTIFIED WITH sha256_password BY 'My_password123@';
GRANT INSERT ON default.session_events TO user_1;
GRANT SELECT ON default.session_events TO user_1;
If you don't specify
GRANT SELECT ON default.session_events TO user_1;
The insert will fail because of missing permission.
The permission should be covered by the definer. Ideally the only grant that should be needed would be:
GRANT INSERT ON default.session_events TO user_1;
The text was updated successfully, but these errors were encountered:
INSERT INTO source
SELECT *
FROM generateRandom()
LIMIT 100
SETTINGS allow_experimental_analyzer = 0
Query id: 1a621b9c-9a91-4731-b630-98e1ca8b6bc3
Ok.
0 rows in set. Elapsed: 0.010 sec.
SQL security doesn't work correctly with the analyzer
pufit
added
bug
Confirmed user-visible misbehaviour in official release
analyzer
Issues and pull-requests related to new analyzer
labels
May 14, 2024
Currently if you have a the following tables:
The minimum set of permission you currently need for a user to insert into the table:
If you don't specify
GRANT SELECT ON default.session_events TO user_1;
The insert will fail because of missing permission.
The permission should be covered by the definer. Ideally the only grant that should be needed would be:
GRANT INSERT ON default.session_events TO user_1;
The text was updated successfully, but these errors were encountered: