-
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
Getting security exception due to access denied "java.lang.RuntimePermission" "accessDeclaredMembers" when trying to get snapshots #4269
Comments
Do you have a short list of steps to reproduce this? I found aws/aws-sdk-java#788 that seems similar, we should narrow this issue down to a jackson-databind update or something like that. I see https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/resources/org/opensearch/bootstrap/security.policy#L64 that explicitly grants that permission to lucene core. So I would start by adding that to the "everything else" part of security.policy to see if it fixes the problem:
If this works, we may need to add it to a more narrow scope, and debug why and how this was introduced, why we didn't catch it earlier, etc. |
We deploy opensearch cluster via docker image (with repository-s3 plugin installed) in a kubernetes cluster in aws and set the settings as specified for Amazon S3 Step 6 in https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore/:
As for the "everything else" part of security.policy, do you mean to update "org/opensearch/bootstrap/security.policy" in opensearch jar under lib directory? |
Yes. Could you please give it a try? Restart the node, see if it changes anything? |
while trying to reproducing this, this message came during building custom docker file to install the s3 security plugin
|
@dblock I replaced opensearch jar with an updated "org/opensearch/bootstrap/security.policy" with the changes you indicated, restarted the node and get snapshot list request successfully returned the info without any permission exception. Interestingly, repository-s3 plugin's plugin-security.policy (https://github.com/opensearch-project/OpenSearch/blob/main/plugins/repository-s3/src/main/plugin-metadata/plugin-security.policy#L36) already grants the same permission but probably limited to the plugin and its dependencies. |
Thanks for the fix! What is the ETA for the release with the fix? |
@tomchlee See https://github.com/orgs/opensearch-project/projects/1 for the release roadmap. I guess it will make it into 2.4.0 (November)? |
@dblock got it, thanks! |
Hi,
After upgrading our opensearch cluster from v1.2.4 to v2.2.0 and configuring to use IRSA via repository-s3 plugin for s3 access, we're getting security exception due to access denied "java.lang.RuntimePermission" "accessDeclaredMembers" when trying to get snapshots:
and stacktrace in opensearch log:
We've followed the steps for Amazon S3 Step 6 in https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore/.
Please advise. Thanks!
The text was updated successfully, but these errors were encountered: