-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add checkCanRefreshMaterializedView access control #7707
Conversation
...trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java
Show resolved
Hide resolved
...trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java
Outdated
Show resolved
Hide resolved
525ec47
to
73b7103
Compare
73b7103
to
12fa1a8
Compare
@@ -11,7 +11,7 @@ | |||
}, | |||
{ | |||
"user": "admin", | |||
"privileges": ["SELECT", "INSERT", "DELETE", "OWNERSHIP"] | |||
"privileges": ["SELECT", "INSERT", "UPDATE", "DELETE", "OWNERSHIP"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to add "UPDATE" if user already has "OWNERSHIP"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FileBasedAccessControl#checkTablePermission doesn't give any special importance to OWNERSHIP privilege, it checks for the presence of specified privilege only.
12fa1a8
to
33b942b
Compare
core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java
Show resolved
Hide resolved
33b942b
to
388ff38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any doc to be updated regarding MV security checks?
Do we have any section on MV at all? cc @mosabua
core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java
Show resolved
Hide resolved
388ff38
to
39b558c
Compare
Doesnt this need some sort of documentation? At least an example? |
If we have no section on materialized views .. we should add one. |
39b558c
to
5f78cd6
Compare
Apply access control check on materialzed view object instead of the storage table for REFRESH MV command.
5f78cd6
to
c9468d6
Compare
@mosabua could you craete issue for this? |
No description provided.