[2.x] Fix permission issue when creating JWTParser after jjwt upgrade#3189
Merged
stephen-crawford merged 1 commit intoopensearch-project:2.xfrom Aug 16, 2023
Merged
Conversation
Signed-off-by: Craig Perkins <craig5008@gmail.com>
Codecov Report
@@ Coverage Diff @@
## 2.x #3189 +/- ##
============================================
- Coverage 62.22% 62.17% -0.06%
+ Complexity 3312 3308 -4
============================================
Files 265 265
Lines 19502 19507 +5
Branches 3328 3329 +1
============================================
- Hits 12136 12129 -7
- Misses 5741 5747 +6
- Partials 1625 1631 +6
|
willyborankin
approved these changes
Aug 16, 2023
Member
Author
|
This works on main w/o the same fix and I am trying to determine why. |
stephen-crawford
approved these changes
Aug 16, 2023
This was referenced Aug 22, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
After the upgrade of JJWT from #3092, the JWT Integration Tests in security-dashboards-plugin started failing. See details on: opensearch-project/security-dashboards-plugin#1555
The output from the tests in Github actions was not very revealing, but @RyanL1997 pointed out that when running the test locally after creating a local distro of core + security plugin with 2.x it would output a permissions error:
This PR surrounds the call to build the parser with
AccessController.doPrivileged(...)to ensure the call has the privileges needed to create the parser.This change should also be applied to main. For some reason, the tests are not failing when running on the main branch but are on 2.x.
Bug fix
Issues Resolved
opensearch-project/security-dashboards-plugin#1555
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.