Package org.elasticsearch.bootstrap
Class PolicyUtil
java.lang.Object
org.elasticsearch.bootstrap.PolicyUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCodebaseJarMap(Set<URL> urls)Return a map from codebase name to codebase url of jar codebases used by ES core.static PluginPolicyInfogetModulePolicyInfo(Path moduleRoot, Path tmpDir)Return info about the security policy for a module.static PluginPolicyInfogetPluginPolicyInfo(Path pluginRoot, Path tmpDir)Return info about the security policy for a plugin.static Set<Permission>getPolicyPermissions(URL url, Policy policy, Path tmpDir)Return permissions for a policy that apply to a jar.static PolicyreadPolicy(URL policyFile, Map<String,URL> codebases)Reads and returns the specifiedpolicyFile.
-
Constructor Details
-
PolicyUtil
public PolicyUtil()
-
-
Method Details
-
getCodebaseJarMap
Return a map from codebase name to codebase url of jar codebases used by ES core. -
readPolicy
Reads and returns the specifiedpolicyFile.Jar files listed in
codebaseslocation will be provided to the policy file via a system property of the short name: e.g.${codebase.joda-convert-1.2.jar}would map to full URL. -
getPluginPolicyInfo
Return info about the security policy for a plugin.- Throws:
IOException
-
getModulePolicyInfo
Return info about the security policy for a module.- Throws:
IOException
-
getPolicyPermissions
public static Set<Permission> getPolicyPermissions(URL url, Policy policy, Path tmpDir) throws IOExceptionReturn permissions for a policy that apply to a jar.- Parameters:
url- The url of a jar to find permissions for, ornullfor global permissions.- Throws:
IOException
-