-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Document function rules for File-based Access Control #14774
Conversation
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.
I've made an initial pass. Defer to @m57lyra if she suggests anything in the same places, as she's better at this than I am.
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.
Some things to take care of.
``query`` polymorphic table function should be used by admins in a first | ||
place. |
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.
I'm not quote sure what is meant here @huberty89 - Do you mean that only admins should have this privilege? If so:
" The query
PTF is recommended for use only by admin or users.
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.
Do you mean that only admins should have this privilege?
In short yes. query
PTF bypass the whole access control and should be used carefully.
To make access more strict, admin
should create a SECURITY DEFINER
views
which execute specific query using query
PTF so user can use only those defined by admin
.
93c1b5d
to
475c417
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.
Just a couple of minor fixes needed.
475c417
to
729ded8
Compare
@@ -25,6 +25,13 @@ cluster in a single JSON file. | |||
Configuration | |||
------------- | |||
|
|||
.. warning:: |
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.
I think this should be part of the release notes. If we add warnings like that we may end up with messy docs.
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.
Agreed, and it should be in a breaking change section, as this will break expected security behaviors.
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.
I was told though that there are no special sections, and release notes are generated from issues?
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.
Release notes are not generated. We write them .. but we do not have a dedicated breaking changes section. But this can be added .. probably was already .. @colebow ?
Also the warning is still appropriate .. maybe without the version info and past behavior though
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.
I remove information about Trino versions
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.
I think we still need this too in release notes.
.. note:: | ||
|
||
It is recommended to only allow admins to use the ``query`` polymorphic table | ||
function. |
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.
Add "why"
Maybe it would be nice to have some best-practices somewhere. Where you would have config to grant access to PTF to admin, then create a (definer) view on top of it with admin as owner and granting access to view to regular users. Maybe we could explain that only somewhere.
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.
I would even say .. remove that.. there is no reason for this to be best practice in general. Instead explain what the consequence is of this setup .. and earlier what happens by default
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.
As in like .. if anyone is allowed to execute table functions.. then what?
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.
query
table function which works as a query pass-though - it's bypass the whole access control so IMO it's quite important to at least mention about it
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.
Yeah .. mention.. but not recommend as best practice.. its just important to understand that it is kind of a security hole otherwise ;-) .. so we need to explain that and not just have a recommendation without detailing the reasoning
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.
Some changes like "regex" might have to wait and be done to the whole document later
@@ -25,6 +25,13 @@ cluster in a single JSON file. | |||
Configuration | |||
------------- | |||
|
|||
.. warning:: |
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.
Release notes are not generated. We write them .. but we do not have a dedicated breaking changes section. But this can be added .. probably was already .. @colebow ?
Also the warning is still appropriate .. maybe without the version info and past behavior though
.. note:: | ||
|
||
It is recommended to only allow admins to use the ``query`` polymorphic table | ||
function. |
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.
I would even say .. remove that.. there is no reason for this to be best practice in general. Instead explain what the consequence is of this setup .. and earlier what happens by default
.. note:: | ||
|
||
It is recommended to only allow admins to use the ``query`` polymorphic table | ||
function. |
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.
As in like .. if anyone is allowed to execute table functions.. then what?
729ded8
to
195091a
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.
Let's update a bit more.
177a916
to
a679b25
Compare
a679b25
to
c658368
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.
Looks good now. @martint could you merge this before the release since the feature already merged with the 401 release.
Description
Update documentation for #13713