Skip to content
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

[doc] add a minimal documentation for OPA RLS capabilities #22424

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

harksin
Copy link

@harksin harksin commented Jun 18, 2024

Description

Add missing docs for OPA security plugin

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

Copy link

cla-bot bot commented Jun 18, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: roch.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@github-actions github-actions bot added the docs label Jun 18, 2024
@mosabua mosabua requested a review from vagaerg June 18, 2024 16:05
@mosabua
Copy link
Member

mosabua commented Jun 18, 2024

Please submit a signed CLA and wrap all paragraphs at 80 columns width. Then we can review in detail

Copy link

cla-bot bot commented Jun 18, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link
Member

@vagaerg vagaerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! This looks good, just some comments

docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
Comment on lines 253 to 257
Column masking allow you to denied access to a particular column instead of the entiere tables from your OPA policy.

for these kind of policies to work, make sure to set `opa.policy.column-masking-uri` in the opa-plugin configuration

here is an example bellow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Column masking allow you to denied access to a particular column instead of the entiere tables from your OPA policy.
for these kind of policies to work, make sure to set `opa.policy.column-masking-uri` in the opa-plugin configuration
here is an example bellow
Column masking allows Trino to mask out/obscure the data in some columns for specific users, without
outright denying access. This plugin supports fetching column masks from OPA.
For these policies to be enabled, make sure to set `opa.policy.column-masking-uri` in the opa-plugin configuration.
For instance, a policy configuring column masking may be implemented as below:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry pushed a update before seing your proposal :/
changed have been re-introduced with commit a714606

`https://opa.example.com/v1/data/rowFilters`.
* - `opa.policy.column-masking-uri`
- The **optional** URI for fetching column masks - if not set no masking will be applied, for example,
`https://opa.example.com/v1/data/columnMask`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @mosiac1 - once #21997 is merged this should be updated

Copy link

cla-bot bot commented Jun 18, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@harksin
Copy link
Author

harksin commented Jun 18, 2024

Please submit a signed CLA and wrap all paragraphs at 80 columns width. Then we can review in detail

thanks for the advice, it's done

Copy link

cla-bot bot commented Jun 18, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
specific users, without outright denying access. This plugin supports fetching
column masks from OPA.

For these policies to be enabled, make sure to set
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work this into the sentence above like in row filtering

docs/src/main/sphinx/security/opa-access-control.md Outdated Show resolved Hide resolved
}
```

Unlike row filtering, only a **single column mask** may be returned for a given
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above .. explain what the script does some more and refactor the section here and following into normal sentences.

@mosabua
Copy link
Member

mosabua commented Jun 26, 2024

Can you address the feedback and suggestions @harksin ?

@mosabua
Copy link
Member

mosabua commented Jun 26, 2024

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Jun 26, 2024
Copy link

cla-bot bot commented Jun 26, 2024

The cla-bot has been summoned, and re-checked this pull request!

@harksin
Copy link
Author

harksin commented Jul 9, 2024

Can you address the feedback and suggestions @harksin ?

Hello mosabua, will do it np, but realy busy these days, it will be beg of august probably.
If you wanna rollout this erlier,feel free to take the hand on this PR

have a great day,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants