Skip to content

Conversation

@opensearch-trigger-bot
Copy link
Contributor

Backport 597747d from #15016.

… perform the method (#15016)

* Add RuntimePermission for markAsSystemContext and allow core to perform the method

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

* private

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

* Surround with doPrivileged

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

* Create ThreadContextAccess

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

* Create notion of ThreadContextPermission

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

* Add to CHANGELOG

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

* Add javadoc

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

* Add to test-framework.policy file

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

* Mark as internal

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

---------

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 597747d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* permission org.opensearch.secure_sm.ThreadContextPermission "markAsSystemContext";
*/
public void markAsSystemContext() {
SecurityManager sm = System.getSecurityManager();
Copy link
Contributor

@reta reta Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed (#15016 (comment)), we need to make this change backward compatible

@github-actions
Copy link
Contributor

✅ Gradle check result for aa182af: SUCCESS

@codecov
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Project coverage is 71.55%. Comparing base (e5e1bad) to head (aa182af).
Report is 6 commits behind head on 2.x.

Files Patch % Lines
.../opensearch/secure_sm/ThreadContextPermission.java 50.00% 2 Missing ⚠️
...ch/common/util/concurrent/ThreadContextAccess.java 71.42% 2 Missing ⚠️
...ensearch/common/util/concurrent/ThreadContext.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #15035      +/-   ##
============================================
+ Coverage     71.48%   71.55%   +0.06%     
- Complexity    62677    62733      +56     
============================================
  Files          5123     5125       +2     
  Lines        294480   294538      +58     
  Branches      42912    42921       +9     
============================================
+ Hits         210518   210747     +229     
+ Misses        66286    66147     -139     
+ Partials      17676    17644      -32     

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

@cwperks
Copy link
Member

cwperks commented Jul 31, 2024

@reta opened a manual backport with the deprecation logger change here: #15038

@reta
Copy link
Contributor

reta commented Jul 31, 2024

Closing in favour of #15038

@reta reta closed this Jul 31, 2024
@andrross andrross deleted the backport/backport-15016-to-2.x branch October 17, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants