-
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
Fix issues due to mask aliasing #15680
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martint
force-pushed
the
mask-aliasing
branch
4 times, most recently
from
January 12, 2023 21:57
fe61228
to
4d62dff
Compare
martint
force-pushed
the
mask-aliasing
branch
from
January 13, 2023 06:30
4d62dff
to
7ae57e4
Compare
ksobolew
reviewed
Jan 13, 2023
...plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java
Outdated
Show resolved
Hide resolved
kokosing
reviewed
Jan 13, 2023
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.
LGTM % comments
core/trino-main/src/main/java/io/trino/security/AccessControlManager.java
Show resolved
Hide resolved
...kit/src/test/java/io/trino/plugin/base/security/BaseFileBasedConnectorAccessControlTest.java
Outdated
Show resolved
Hide resolved
weiatwork
reviewed
Jan 13, 2023
core/trino-main/src/main/java/io/trino/security/AccessControlManager.java
Show resolved
Hide resolved
martint
force-pushed
the
mask-aliasing
branch
4 times, most recently
from
January 14, 2023 00:05
042eb62
to
e29729b
Compare
kokosing
approved these changes
Jan 14, 2023
ksobolew
reviewed
Jan 16, 2023
...trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java
Outdated
Show resolved
Hide resolved
martint
force-pushed
the
mask-aliasing
branch
2 times, most recently
from
January 17, 2023 01:47
9f80643
to
5be85e4
Compare
This is problematic because: * There is no guarantee about the ordering of application of masks, which could result in non-deterministic results at best or query failures in the worst case * Allowing multiple masks, especially when provided by different connectors, means that one cannot reason about a mask expression in isolation with respect to the input the expression expects.
This causes two problems: * Masks can inadvertently refer to columns that appear earlier in the list of columns as the projection is planned. This causes the mask expression to see the masked value of other columns instead of the underlying value * A possible bug in other optimizers causes mask expressions to be lost when the result of a such an expression is of type ROW and there's a dereference of a field downstream
martint
force-pushed
the
mask-aliasing
branch
from
January 17, 2023 16:52
5be85e4
to
fc57354
Compare
utk-spartan
added a commit
to utk-spartan/ranger
that referenced
this pull request
Mar 8, 2023
Incorporate following changes Remove deprecated checkCanCreateSchema trinodb/trino#15618 trinodb/trino@0fac087 Disallow multiple masks on a given column trinodb/trino#15680 trinodb/trino@bdd1cb5
utk-spartan
added a commit
to razorpay/ranger
that referenced
this pull request
Mar 8, 2023
Incorporate following changes Remove deprecated checkCanCreateSchema trinodb/trino#15618 trinodb/trino@0fac087 Disallow multiple masks on a given column trinodb/trino#15680 trinodb/trino@bdd1cb5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix aliasing of fields in mask expressions
This causes two problems:
in the list of columns as the projection is planned. This
causes the mask expression to see the masked value of other columns
instead of the underlying value
lost when the result of a such an expression is of type ROW
and there's a dereference of a field downstream
Fixes #15659
Relates to #14420
Release notes
(x) Release notes are required, with the following suggested text: