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

[Backport 2.x] Remove identity-related feature flagged code from the RestController (#15430) #16004

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Sep 19, 2024

Manual backport of #15430 to 2.x

…pensearch-project#15430)

* Add authenticate to IdentityPlugin interface

Signed-off-by: Craig Perkins <[email protected]>

* Handle null

Signed-off-by: Craig Perkins <[email protected]>

* Fix tests

Signed-off-by: Craig Perkins <[email protected]>

* Fix ActionModuleTests

Signed-off-by: Craig Perkins <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Add DelegatingRestHandlerTests

Signed-off-by: Craig Perkins <[email protected]>

* Address forbiddenApi

Signed-off-by: Craig Perkins <[email protected]>

* Remove authenticate from IdentityPlugin and keep RestController feature flagged code removed

Signed-off-by: Craig Perkins <[email protected]>

* Move RestTokenExtractor to identity-shiro plugin

Signed-off-by: Craig Perkins <[email protected]>

* Remove change in IdentityService

Signed-off-by: Craig Perkins <[email protected]>

* Remove changes in ActionModuleTests

Signed-off-by: Craig Perkins <[email protected]>

* Add tests for RestTokenExtractor

Signed-off-by: Craig Perkins <[email protected]>

* Remove DelegatingRestHandler

Signed-off-by: Craig Perkins <[email protected]>

* Call super instead of keeping a reference to the delegated restHandler

Signed-off-by: Craig Perkins <[email protected]>

* Address code review comments

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 1bc81d3)
Copy link
Contributor

❌ Gradle check result for d009780: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@reta
Copy link
Collaborator

reta commented Sep 20, 2024

@cwperks apologies but there are conflicts now :(

@cwperks
Copy link
Member Author

cwperks commented Sep 20, 2024

np, resolved the conflicts.

Copy link
Contributor

✅ Gradle check result for 47aa079: SUCCESS

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 18 lines in your changes missing coverage. Please review.

Project coverage is 71.68%. Comparing base (dd5c31b) to head (47aa079).
Report is 3 commits behind head on 2.x.

Files with missing lines Patch % Lines
...opensearch/identity/shiro/ShiroIdentityPlugin.java 0.00% 16 Missing ⚠️
...opensearch/identity/shiro/ShiroTokenExtractor.java 50.00% 1 Missing ⚠️
...ensearch/identity/shiro/realm/OpenSearchRealm.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #16004      +/-   ##
============================================
+ Coverage     71.57%   71.68%   +0.11%     
- Complexity    64569    64668      +99     
============================================
  Files          5277     5277              
  Lines        302350   302344       -6     
  Branches      43996    43993       -3     
============================================
+ Hits         216398   216742     +344     
+ Misses        67825    67507     -318     
+ Partials      18127    18095      -32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@reta reta merged commit 448ae5e into opensearch-project:2.x Sep 20, 2024
34 of 35 checks passed
@reta reta added the v2.18.0 Issues and PRs related to version 2.18.0 label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.18.0 Issues and PRs related to version 2.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants