Skip to content

Conversation

@ldematte
Copy link
Contributor

Backport of #124865

The JDK team has completely disabled the Java SecurityManager from Java 24. Elasticsearch has always used the Java SecurityManager as an additional protection mechanism; in order to retain this second line of defense, the Elasticsearch Core/Infra team has been working on the Entitlements project.

Similar to SecurityManager, Entitlements only allow calling specific methods in the JDK when the caller has a matching policy attached. In other words, if some code (in the main Elasticsearch codebase, in a plugin/module, or in a script) attempts to perform a "privileged" operation and it is not entitled to do so, a NotEntitledException will be thrown.

This PR includes the minimal set of changes to always use Entitlements, regardless of system properties or Java version.

Relates to ES-10921
@ldematte ldematte added >upgrade backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v8.19.0 :Core/Infra/Entitlements Entitlements infrastructure labels Mar 18, 2025
@ldematte ldematte merged commit 653313b into elastic:8.x Mar 18, 2025
15 checks passed
@ldematte ldematte deleted the backport/8.x/entitlements/always-enabled-minimal branch March 18, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Entitlements Entitlements infrastructure >upgrade v8.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant