File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
libs/agent-sm/agent-policy/src/main/java/org/opensearch/secure_sm/policy
server/src/main/resources/org/opensearch/bootstrap Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,13 @@ private static PermissionEntry expandPermissionName(PermissionEntry pe) {
137137 while ((b = pe .name ().indexOf ("${{" , startIndex )) != -1 && (e = pe .name ().indexOf ("}}" , b )) != -1 ) {
138138 sb .append (pe .name (), startIndex , b );
139139 String value = pe .name ().substring (b + 3 , e );
140- sb .append ("${{" ).append (value ).append ("}}" );
140+ String propertyValue = System .getProperty (value );
141+ if (propertyValue != null ) {
142+ sb .append (propertyValue );
143+ } else {
144+ // replacement not found
145+ sb .append ("${{" ).append (value ).append ("}}" );
146+ }
141147 startIndex = e + 2 ;
142148 }
143149
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ grant codeBase "file:${gradle.worker.jar}" {
170170grant {
171171 // since the gradle test worker jar is on the test classpath, our tests should be able to read it
172172 permission java.io.FilePermission "${gradle.worker.jar}", "read";
173+ permission java.io.FilePermission "${{gradle.user.home}}/-", "read";
173174 permission java.lang.RuntimePermission "accessDeclaredMembers";
174175 permission java.lang.RuntimePermission "reflectionFactoryAccess";
175176 permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
You can’t perform that action at this time.
0 commit comments