Skip to content

Commit 883bbe3

Browse files
committed
Entitlement trivially allowed for EntitlementChecker class
1 parent 370d7e0 commit 883bbe3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import org.elasticsearch.core.Strings;
1313
import org.elasticsearch.core.SuppressForbidden;
14+
import org.elasticsearch.entitlement.bridge.EntitlementChecker;
1415
import org.elasticsearch.entitlement.instrumentation.InstrumentationService;
1516
import org.elasticsearch.entitlement.runtime.api.NotEntitledException;
1617
import org.elasticsearch.entitlement.runtime.policy.entitlements.CreateClassLoaderEntitlement;
@@ -518,6 +519,10 @@ private static boolean isTriviallyAllowed(Class<?> requestingClass) {
518519
logger.debug("Entitlement trivially allowed from system module [{}]", requestingClass.getModule().getName());
519520
return true;
520521
}
522+
if (EntitlementChecker.class.isAssignableFrom(requestingClass)) {
523+
logger.debug("Entitlement trivially allowed for EntitlementChecker class");
524+
return true;
525+
}
521526
logger.trace("Entitlement not trivially allowed");
522527
return false;
523528
}

muted-tests.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,6 @@ tests:
398398
- class: org.elasticsearch.indices.recovery.IndexRecoveryIT
399399
method: testSourceThrottling
400400
issue: https://github.com/elastic/elasticsearch/issues/122712
401-
- class: org.elasticsearch.entitlement.qa.EntitlementsDeniedNonModularIT
402-
issue: https://github.com/elastic/elasticsearch/issues/122569
403-
- class: org.elasticsearch.entitlement.qa.EntitlementsAllowedNonModularIT
404-
issue: https://github.com/elastic/elasticsearch/issues/122568
405-
- class: org.elasticsearch.entitlement.qa.EntitlementsAllowedIT
406-
issue: https://github.com/elastic/elasticsearch/issues/122680
407-
- class: org.elasticsearch.entitlement.qa.EntitlementsDeniedIT
408-
issue: https://github.com/elastic/elasticsearch/issues/122566
409401

410402
# Examples:
411403
#

0 commit comments

Comments
 (0)