Skip to content

Commit 08bc6b0

Browse files
committed
let apm classloader read whatever it wants
1 parent 5ebee3e commit 08bc6b0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/PolicyManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ public void checkFileRead(Class<?> callerClass, Path path) {
332332
if (isTriviallyAllowed(requestingClass)) {
333333
return;
334334
}
335-
335+
if (requestingClass.getName().equals("co.elastic.apm.agent.premain.ShadedClassLoader")) {
336+
return;
337+
}
336338
ModuleEntitlements entitlements = getEntitlements(requestingClass);
337339
if (entitlements.fileAccess().canRead(path) == false) {
338340
notEntitled(

modules/apm/src/main/plugin-metadata/entitlement-policy.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
org.elasticsearch.telemetry.apm:
2-
- files:
3-
- path: "/usr/share/elasticsearch/modules/apm/elastic-apm-agent-1.52.3-SNAPSHOT.jar"
4-
mode: "read"
52
- create_class_loader
63
- write_system_properties:
74
properties:

0 commit comments

Comments
 (0)