-
Notifications
You must be signed in to change notification settings - Fork 281
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
Add support for ResolveIndexAction handling #1312
Add support for ResolveIndexAction handling #1312
Conversation
9139965
to
57a1038
Compare
57a1038
to
f7a9f3f
Compare
682ff79
to
31590b6
Compare
Codecov Report
@@ Coverage Diff @@
## main #1312 +/- ##
============================================
+ Coverage 64.78% 64.81% +0.03%
+ Complexity 3204 3202 -2
============================================
Files 247 247
Lines 17252 17243 -9
Branches 3053 3050 -3
============================================
Hits 11176 11176
+ Misses 4526 4517 -9
Partials 1550 1550
Continue to review full report at Codecov.
|
src/main/java/org/opensearch/security/resolver/IndexResolverReplacer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
squash commits |
Will squash when merging |
778c284
to
01ea9ff
Compare
I don't see a need to keep history of unrelated commits on the PR. It makes PR review harder, not easier. Number of commits is larger than number of files modified in the PR. Please squash commits. |
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
add resolve to dnfof logic unify operation flows where possible add dnfof pattern add test cases for resolve
c185edf
to
eb97a93
Compare
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
da9f003
to
7c7d6f3
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.
Please file issue to revisit Replaceable
handling with dnfof
flag on.
(Cherry picked from commit 565ac79)
(Cherry picked from commit 565ac79)
* Add release note for 1.3.8 Signed-off-by: Ryan Liang <jiallian@amazon.com>
opendistro-for-elasticsearch/security pull request intake form
Please provide as much details as possible to get feedback/acceptance on your PR quickly
Category: (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
Bug fix
Github Issue # or road-map entry, if available:
https://github.com/opendistro-for-elasticsearch/security/issues/893
https://github.com/opendistro-for-elasticsearch/security-kibana-plugin/issues/598
Description of changes:
Fix requests hitting
_resolve
endpoint failed with403 forbidden
error due to accessing indices without proper permission. By re-configuring the logic in code, requests that were to return403
will now success with200
and not permitted indices will be filtered from its result.Additional code added to unit tests and configuration ensures such behavior change does not compromise code integrity.
Why these changes are required?
Customers reported being unable to create index in Kibana due to previously mentioned
403 forbidden
error. Such error is effecting customer production thus needs ti be fixed.What is the old behavior before changes and new behavior after changes? (Please add any example/logs/screen-shot if available)
Old behavior:
_resolve
endpoint is not properly handled in code, thus causing it to return403
status code when ever indices that are not allowed access to the user are contained in the response. This error causes Kibana failed to allow user to create indices that they should otherwise be allowed.New behavior:
_resolve
api is properly handled. If previously mentioned invalid access is encountered, security plugin automatically remove invalid indices accesses in the response and return with200 ok
status.ResolveIndexAction is now supported in the execution path when
do_not_fail_on_forbidden
flag set totrue
Testing done: (Please provide details of testing done: Unit testing, integration testing and manual testing)
Unit test regarding such feature is updated to accommodate with such change.
Manual tests on Kibana web UI is conducted to ensure creation of desired index pattern is allowed.
TO-DOs, if any: (Please describe pending items and provide Github issues# for each of them)
Update multi-cluster integratoin tests as
_resolve
api introduced cross-cluster support for getting different index patternsIs it backport from main branch? (If yes, please add backport PR # and commits #)
opendistro-1.11
opendistro-1.13
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.