3535
3636import static java .util .Objects .requireNonNull ;
3737
38+ /**
39+ * Main entry point for firing up the Entitlements system.
40+ * Called by ES {@code initPhase2} to load the agent after setting up its prerequisites,
41+ * such as {@link BootstrapArgs} and some special module exports.
42+ */
3843public class EntitlementBootstrap {
3944
4045 public record BootstrapArgs (
@@ -63,9 +68,11 @@ public static BootstrapArgs bootstrapArgs() {
6368 /**
6469 * Activates entitlement checking. Once this method returns, calls to methods protected by Entitlements from classes without a valid
6570 * policy will throw {@link org.elasticsearch.entitlement.runtime.api.NotEntitledException}.
71+ * <p>
72+ * (Note: when we reference Elasticsearch "plugins" here, we generally also include Elasticsearch "modules".)
6673 *
6774 * @param serverPolicyPatch a policy with additional entitlements to patch the embedded server layer policy
68- * @param pluginPolicies a map holding policies for plugins (and modules) , by plugin (or module) name.
75+ * @param pluginPolicies a map holding policies for plugins, by plugin name.
6976 * @param scopeResolver a functor to map a Java Class to the component and module it belongs to.
7077 * @param settingResolver a functor to resolve a setting name pattern for one or more Elasticsearch settings.
7178 * @param dataDirs data directories for Elasticsearch
@@ -74,7 +81,7 @@ public static BootstrapArgs bootstrapArgs() {
7481 * @param libDir the lib directory for Elasticsearch
7582 * @param modulesDir the directory where Elasticsearch modules are
7683 * @param pluginsDir the directory where plugins are installed for Elasticsearch
77- * @param sourcePaths a map holding the path to each plugin or module jars, by plugin (or module) name.
84+ * @param sourcePaths a map holding the path to each plugin or module jars, by plugin name.
7885 * @param tempDir the temp directory for Elasticsearch
7986 * @param logsDir the log directory for Elasticsearch
8087 * @param pidFile path to a pid file for Elasticsearch, or {@code null} if one was not specified
0 commit comments