-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Correct permissions of jackson-databind "the correct way" #5767
Correct permissions of jackson-databind "the correct way" #5767
Conversation
@@ -462,6 +463,7 @@ public void testVersionSetting() throws IOException { | |||
} | |||
} | |||
|
|||
@Ignore("https://github.com/opensearch-project/OpenSearch/issues/5504") |
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.
This test of course fails as it uses setAccessible and also adds SuppressForbidden!? There was a reason why the forbiddenapis forbids setAccessible()
!
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.
I think you're saying that this is by design. Let's rewrite the test as such!
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.
See other PR #5768, I made a proposal. Alternatively remove the test. Because if the fields are "final" theres no need to test any other value than the final value.
@@ -79,6 +79,12 @@ grant codeBase "${codebase.jna}" { | |||
permission java.lang.RuntimePermission "accessDeclaredMembers"; | |||
}; | |||
|
|||
grant codeBase "${codebase.jackson-databind}" { |
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.
👍
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.
Unfortunately this is not working for jackson-databind, so we need a workaround or we should look at the new PR #5768.
Gradle Check (Jenkins) Run Completed with:
|
I will close this as we have #5768, removing the dependency from server core. In general this approach is the correct one to limit permissions to specific JAR files, but the downside is that the JAR file must implement |
Description
[Describe what this change achieves]
Issues Resolved
This is to demonstrate how to fix #5504 the "correct way"
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.