Class EntitlementBootstrap

java.lang.Object
org.elasticsearch.entitlement.bootstrap.EntitlementBootstrap

public class EntitlementBootstrap extends Object
  • Constructor Details

    • EntitlementBootstrap

      public EntitlementBootstrap()
  • Method Details

    • bootstrap

      public static void bootstrap(Policy serverPolicyPatch, Map<String,Policy> pluginPolicies, Function<Class<?>,PolicyManager.PolicyScope> scopeResolver, Function<String,Stream<String>> settingResolver, Path[] dataDirs, Path sharedDataDir, Path[] sharedRepoDirs, Path configDir, Path libDir, Path modulesDir, Path pluginsDir, Map<String,Collection<Path>> pluginSourcePaths, Path logsDir, Path tempDir, @Nullable Path pidFile, Set<Package> suppressFailureLogPackages)
      Main entry point that activates entitlement checking. Once this method returns, calls to methods protected by entitlements from classes without a valid policy will throw NotEntitledException.
      Parameters:
      serverPolicyPatch - additional entitlements to patch the embedded server layer policy
      pluginPolicies - maps each plugin name to the corresponding Policy
      scopeResolver - a functor to map a Java Class to the component and module it belongs to.
      settingResolver - a functor to resolve a setting name pattern for one or more Elasticsearch settings.
      dataDirs - data directories for Elasticsearch
      sharedDataDir - shared data directory for Elasticsearch (deprecated)
      sharedRepoDirs - shared repository directories for Elasticsearch
      configDir - the config directory for Elasticsearch
      libDir - the lib directory for Elasticsearch
      modulesDir - the directory where Elasticsearch modules are
      pluginsDir - the directory where plugins are installed for Elasticsearch
      pluginSourcePaths - maps each plugin name to the location of that plugin's code
      logsDir - the log directory for Elasticsearch
      tempDir - the temp directory for Elasticsearch
      pidFile - path to a pid file for Elasticsearch, or null if one was not specified
      suppressFailureLogPackages - packages for which we do not need or want to log Entitlements failures