-
-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Batch OPA column mask calls #827
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
Open
xeniape
wants to merge
25
commits into
main
Choose a base branch
from
feat/batch-opa-column-mask-calls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
9b5eba6
add batchColumnMasks OPA endpoint, add schema definition, adjust oper…
xeniape 76aeaf5
add/adjust tests, add crd field to disable column masking
xeniape e2e563d
Merge branch 'main' into feat/batch-opa-column-mask-calls
xeniape a607d95
incorporate decision feedback
xeniape de1b3af
Merge branch 'main' into feat/batch-opa-column-mask-calls
xeniape b1addca
adjust tests
xeniape df98f6c
make `opa` within `authorization` a required enum variant
xeniape 36319f9
Merge branch 'main' into feat/batch-opa-column-mask-calls
xeniape 1320aef
pre-commit fixes
xeniape 2d4c4ad
refactor code, add documenation
xeniape 06b2878
add changelog entries
xeniape 34767d9
Merge branch 'main' into feat/batch-opa-column-mask-calls
xeniape 44e6bc5
cleanup test and unnecessary function
xeniape 185e651
fix docs
xeniape 8afff5d
Merge branch 'main' into feat/batch-opa-column-mask-calls
xeniape e43bf44
remove version 451 test handling
xeniape e5440e7
Update rust/operator-binary/src/crd/mod.rs
xeniape b13c4ed
Update tests/templates/kuttl/opa-authorization/trino_rules/trino/veri…
xeniape 0e7d758
Update tests/templates/kuttl/opa-authorization/trino_rules/trino/veri…
xeniape d635bdd
remove unneeded line wrap
xeniape 681bc60
fix docs
xeniape 8505a4e
update config overrides list
xeniape 3c12023
fix rego test
xeniape 92a4f17
disable columnmasking in example
xeniape d35c6e7
pre-commit fixes
xeniape File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| = Security | ||
|
|
||
| == Authorization | ||
|
|
||
| === OPA | ||
|
|
||
| ==== Column masking | ||
|
|
||
| ===== CRD configuration | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| apiVersion: trino.stackable.tech/v1alpha1 | ||
| kind: TrinoCluster | ||
| spec: | ||
| clusterConfig: | ||
| authorization: | ||
| opa: | ||
| enableColumnMasking: true # default | ||
| ---- | ||
|
|
||
| ===== Result | ||
|
|
||
| In the `access-control.properties` file, the following value is set when `enableColumnMasking` is set to `true`: | ||
|
|
||
| [source] | ||
| ---- | ||
| opa.policy.batch-column-masking-uri=<opa-url>/v1/data/<package>/batchColumnMasks # <1> <2> | ||
| ---- | ||
|
|
||
| <1> `<opa-url>` is read from the OPA discovery ConfigMap | ||
| <2> `<package>` is read from `spec.clusterConfig.authorization.opa.package` if set, otherwise defaults to the TrinoCluster name | ||
|
|
||
| ===== Considerations | ||
|
|
||
| The default setting for `enableColumnMasking` assumes a `batchColumnMasks` rule is defined in the Rego rules for the TrinoCluster. | ||
| If no such rule is defined, Trino queries that utilize the column masking endpoint will fail. |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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 haven't you added this information to
usage-guide/security.adoc? I would not have expected a second security page.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.
Because the content of that documentation is a reference and not a guide https://diataxis.fr/reference/