-
Notifications
You must be signed in to change notification settings - Fork 343
Introduce new dynamic setting (plugins.security.dls.write_blocked) to block all writes when restrictions apply
#5828
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
base: main
Are you sure you want to change the base?
Conversation
…search-project#5556) Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Darshit Chanpura <[email protected]>
… from being shaded in opensaml jar (opensearch-project#5559) Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5828 +/- ##
==========================================
+ Coverage 73.66% 73.68% +0.02%
==========================================
Files 438 438
Lines 26642 26653 +11
Branches 3937 3939 +2
==========================================
+ Hits 19626 19640 +14
+ Misses 5146 5138 -8
- Partials 1870 1875 +5
🚀 New features to boost your workflow:
|
DarshitChanpura
left a comment
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.
changes mostly look good to me. Left couple of comments.
I see commits around CHANGELOG entry but don't see the CHANGELOG file modified. We should add an entry for this feature.
| new OpenSearchSecurityException("Update is not supported when FLS or DLS or Fieldmasking is activated") | ||
| new OpenSearchSecurityException( | ||
| inner.request().getClass().getSimpleName() | ||
| + " is not supported when FLS or DLS or Fieldmasking is activated" |
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.
this message should change to "...when write block is active". thoughts?
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 agree that the message is bad, but I think it can be reworded differently. Maybe, <WriteRequest> is not support when index has FLS, DLS or FieldMasking Restrictions?
| } | ||
| List<Response> responses = RestHelper.requestAgainstAllNodes( | ||
| testUserRestClient, | ||
| adminClient(), |
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 change it to adminClient?
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.
Bc the test user has restrictions on the index. Its better to use admin client here which has no restrictions.
This block is for seeding test data for bwc tests and if we made the default for this new setting true then the calls here would fail since the test user has restrictions.
I was planning to push it after the CHANGELOG is cleared for 3.5 since I think this will miss the 3.4 release train. |
Description
This PR adds a new dynamic cluster setting (
plugins.security.dls.write_blocked) to block all write operations against indices where restrictions apply for the calling user. When set totrueall write operations (IndexRequest, UpdateRequest, DeleteRequest) are blocked. When set tofalse(the default value) only UpdateRequest is block whereas other write operations are permitted.Currently, the documentation website has a blurb on dls and write permissions that instructs cluster administrators about this behavior, but this behavior has caused confusion. This PR aims to introduce a cluster setting to prevent cluster admins from shooting themselves in the foot.
Enhancement
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.