-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Entitlements] Allow read access to a plugin's directory #124111
[Entitlements] Allow read access to a plugin's directory #124111
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few suggestions
libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/FileAccessTree.java
Outdated
Show resolved
Hide resolved
libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/FileAccessTree.java
Outdated
Show resolved
Hide resolved
.../entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
return Paths.get(codeSource.getLocation().toURI()); | ||
} catch (Exception e) { | ||
// If we get a URISyntaxException, or any other Exception due to an invalid URI, we return null to safely skip this location | ||
logger.info( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be warning?
💔 Backport failed
You can use sqren/backport to manually backport by running |
While implementing checks for access to JAR files via URL, we realized that several libraries (our own XConent, Jackson, Tika) need to access the plugin's JARs for reflection purposes.
This PR adds a functionality to allow each plugin to read access on its own directory.