Skip to content

Commit 7a83aff

Browse files
ldematteprdoyle
andauthored
Apply suggestions from code review
Co-authored-by: Patrick Doyle <[email protected]>
1 parent c13d156 commit 7a83aff

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/instrumentation/Instrumenter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public interface Instrumenter {
1313

1414
/**
15-
* Instruments a class by adding a prologue to check for entitlements to a set of its methods.
15+
* Instruments the appropriate methods of a class by adding a prologue that checks for entitlements.
1616
* The prologue:
1717
* <ol>
1818
* <li>

libs/entitlement/src/main/java/org/elasticsearch/entitlement/package-info.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,17 @@
175175
* Most of the entitlements are "flag" entitlements: when present, it grants the caller the right to perform an action (or a set of
176176
* actions); when it's not present, the actions associated with it are denied. Checking is simply a fact checking if the entitlement type
177177
* is present or not.
178-
* The two exceptions are system properties, where we further get the instance of the entitlement for the
178+
* There are two entitlements that are not simple flags:
179+
* <ul>
180+
* <li>system properties, where we further get the instance of the entitlement for the
179181
* {@link org.elasticsearch.entitlement.runtime.policy.entitlements.WriteSystemPropertiesEntitlement} class, and we check if it contains
180-
* that specific property name, and filesystem access, which is treated separately for convenience and performance reasons.
182+
* that specific property name, and
183+
* </li>
184+
* <li>
185+
* file access, which is treated separately for convenience and performance reasons.
181186
* See {@link org.elasticsearch.entitlement.runtime.policy.FileAccessTree} for details.
187+
* </li>
188+
* <ul>
182189
* </p>
183190
* <p>
184191
* A final special cases that short circuit the checks (resulting in a "trivially allowed" case) is when the caller is null is the special

0 commit comments

Comments
 (0)