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

Optimize by avoid creating wildcard matchers for every request #902

Merged
merged 3 commits into from
Dec 22, 2020
Merged

Optimize by avoid creating wildcard matchers for every request #902

merged 3 commits into from
Dec 22, 2020

Conversation

sujithvm
Copy link
Contributor

@sujithvm sujithvm commented Dec 18, 2020

opendistro-for-elasticsearch/security pull request intake form

Please provide as much details as possible to get feedback/acceptance on your PR quickly

  1. Category: (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
  • Refactoring
  1. Github Issue # or road-map entry, if available:
  • N/A
  1. Description of changes:
  1. Why these changes are required?
  • Optimize creating wildcard matchers and few loops for every request hence improving performance
  1. What is the old behavior before changes and new behavior after changes? (Please add any example/logs/screen-shot if available)
  • No changes in behavior
  1. Testing done: (Please provide details of testing done: Unit testing, integration testing and manual testing)
  • Automated tests
  1. TO-DOs, if any: (Please describe pending items and provide Github issues# for each of them)
  1. Is it backport from master branch? (If yes, please add backport PR # and commits #)
  • No

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

… constant resources users, backend roles, hosts
@sujithvm sujithvm requested a review from a team as a code owner December 18, 2020 00:41
@sujithvm sujithvm requested a review from vrozov December 18, 2020 01:10
@codecov
Copy link

codecov bot commented Dec 18, 2020

Codecov Report

Merging #902 (027e07e) into master (6112828) will increase coverage by 0.04%.
The diff coverage is 81.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #902      +/-   ##
============================================
+ Coverage     64.45%   64.49%   +0.04%     
- Complexity     3223     3224       +1     
============================================
  Files           244      244              
  Lines         17172    17173       +1     
  Branches       3047     3047              
============================================
+ Hits          11068    11076       +8     
+ Misses         4556     4550       -6     
+ Partials       1548     1547       -1     
Impacted Files Coverage Δ Complexity Δ
...ticsearch/security/securityconf/ConfigModelV6.java 27.81% <63.63%> (+0.11%) 5.00 <0.00> (ø)
...ticsearch/security/securityconf/ConfigModelV7.java 63.50% <100.00%> (ø) 22.00 <0.00> (ø)
...ty/configuration/ConfigurationLoaderSecurity7.java 67.76% <0.00%> (-0.83%) 10.00% <0.00%> (ø%)
.../dlic/auth/ldap2/LDAPConnectionFactoryFactory.java 56.48% <0.00%> (-0.77%) 23.00% <0.00%> (ø%)
...ecurity/configuration/ConfigurationRepository.java 73.77% <0.00%> (+4.91%) 21.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6112828...c0a38b2. Read the comment docs.

@vrozov vrozov added the refactoring code/test refactoring label Dec 19, 2020
@sujithvm sujithvm merged commit db56dc2 into opensearch-project:master Dec 22, 2020
hardik-k-shah pushed a commit that referenced this pull request Feb 1, 2021
* Optimize creating new collection objects in IndexResolverReplacer (#911)

(cherry picked from commit 6632cd5)

* Optimize by avoid creating wildcard matchers for every request  (#902)

* Optimize by avoiding creating wildcard matchers for every request for constant resources users, backend roles, hosts

* Use hash set instead of tree set as we are not taking any advantage of ordering

* Convert collection to list

(cherry picked from commit db56dc2)

* Short circuit privilege evaluation for bulk requests without index resolution (#926)

(cherry picked from commit d9459dd)

* Try using another port 8088 for running the webhook test (#999)

(cherry picked from commit 7db5afe)
@cliu123 cliu123 added the maintenance Project maintenance label Feb 2, 2021
hardik-k-shah pushed a commit that referenced this pull request Feb 22, 2021
* Optimize creating new collection objects in IndexResolverReplacer (#911)

(cherry picked from commit 6632cd5)

* Optimize by avoid creating wildcard matchers for every request  (#902)

* Optimize by avoiding creating wildcard matchers for every request for constant resources users, backend roles, hosts

* Use hash set instead of tree set as we are not taking any advantage of ordering

* Convert collection to list

(cherry picked from commit db56dc2)

* Short circuit privilege evaluation for bulk requests without index resolution (#926)

(cherry picked from commit d9459dd)
hardik-k-shah pushed a commit that referenced this pull request Feb 22, 2021
* Optimize creating new collection objects in IndexResolverReplacer (#911)

(cherry picked from commit 6632cd5)

* Optimize by avoid creating wildcard matchers for every request  (#902)

* Optimize by avoiding creating wildcard matchers for every request for constant resources users, backend roles, hosts

* Use hash set instead of tree set as we are not taking any advantage of ordering

* Convert collection to list

(cherry picked from commit db56dc2)

* Short circuit privilege evaluation for bulk requests without index resolution (#926)

(cherry picked from commit d9459dd)
hardik-k-shah pushed a commit that referenced this pull request Feb 22, 2021
* Optimize creating new collection objects in IndexResolverReplacer (#911)

(cherry picked from commit 6632cd5)

* Optimize by avoid creating wildcard matchers for every request  (#902)

* Optimize by avoiding creating wildcard matchers for every request for constant resources users, backend roles, hosts

* Use hash set instead of tree set as we are not taking any advantage of ordering

* Convert collection to list

(cherry picked from commit db56dc2)

* Short circuit privilege evaluation for bulk requests without index resolution (#926)

(cherry picked from commit d9459dd)
hardik-k-shah pushed a commit that referenced this pull request Feb 26, 2021
* Optimize creating new collection objects in IndexResolverReplacer (#911)

(cherry picked from commit 6632cd5)

* Optimize by avoid creating wildcard matchers for every request  (#902)

* Optimize by avoiding creating wildcard matchers for every request for constant resources users, backend roles, hosts

* Use hash set instead of tree set as we are not taking any advantage of ordering

* Convert collection to list

(cherry picked from commit db56dc2)

* Short circuit privilege evaluation for bulk requests without index resolution (#926)

(cherry picked from commit d9459dd)
lbreinig pushed a commit to lbreinig/security that referenced this pull request Dec 23, 2021
…earch-project#902)

* Optimize by avoiding creating wildcard matchers for every request for constant resources users, backend roles, hosts

* Use hash set instead of tree set as we are not taking any advantage of ordering

* Convert collection to list
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
…earch-project#902)

* Optimize by avoiding creating wildcard matchers for every request for constant resources users, backend roles, hosts

* Use hash set instead of tree set as we are not taking any advantage of ordering

* Convert collection to list
gaobinlong pushed a commit to gaobinlong/security that referenced this pull request Aug 30, 2023
Signed-off-by: Peter Nied <petern@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Project maintenance refactoring code/test refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants