From 6e1f9f00ccfc962d23eb919490bb50cfaa4b5d63 Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Mon, 18 Sep 2023 11:35:45 -0700 Subject: [PATCH] Grant getClassLoader Signed-off-by: Ryan Liang --- .../main/resources/org/opensearch/bootstrap/security.policy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/main/resources/org/opensearch/bootstrap/security.policy b/server/src/main/resources/org/opensearch/bootstrap/security.policy index 77cd0ab05278e..66cc95c28916a 100644 --- a/server/src/main/resources/org/opensearch/bootstrap/security.policy +++ b/server/src/main/resources/org/opensearch/bootstrap/security.policy @@ -37,6 +37,10 @@ //// SecurityManager impl: //// Must have all permissions to properly perform access checks +grant { + permission java.lang.RuntimePermission "getClassLoader"; +}; + grant codeBase "${codebase.opensearch-secure-sm}" { permission java.security.AllPermission; }; @@ -48,6 +52,8 @@ grant codeBase "${codebase.opensearch}" { permission java.lang.RuntimePermission "setContextClassLoader"; // needed for SPI class loading permission java.lang.RuntimePermission "accessDeclaredMembers"; + + permission java.lang.RuntimePermission "getClassLoader"; }; //// Very special jar permissions: