Class ClassPermission

org.elasticsearch.script.ClassPermission
All Implemented Interfaces:
,

public final class ClassPermission extends
Checked by scripting engines to allow loading a java class.

Examples:

Allow permission to java.util.List

permission org.elasticsearch.script.ClassPermission "java.util.List";
Allow permission to classes underneath java.util (and its subpackages such as java.util.zip)
permission org.elasticsearch.script.ClassPermission "java.util.*";
Allow permission to standard predefined list of basic classes (see list below)
permission org.elasticsearch.script.ClassPermission "<<STANDARD>>";
Allow permission to all classes
permission org.elasticsearch.script.ClassPermission "*";

Set of classes (allowed by special value <<STANDARD>>):

  • DateTime
  • DateTimeUtils
  • DateTimeZone
  • Instant
  • ReadableDateTime
  • ReadableInstant
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static
     
    static <>
    Typical set of classes for scripting: basic data types, math, dates, and simple collections
  • Constructor Summary

    Constructors
    Constructor
    Description
     name)
    Creates a new ClassPermission object.
     name,  actions)
    Creates a new ClassPermission object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     p)
     
     

    Methods inherited from class java.security.

    , ,

    Methods inherited from class java.security.

    , ,

    Methods inherited from class java.lang.

    , , , , , , ,
  • Field Details

    • STANDARD

      public static final  STANDARD
      See Also:
      Constant Field Values
    • STANDARD_CLASSES

      public static final <> STANDARD_CLASSES
      Typical set of classes for scripting: basic data types, math, dates, and simple collections
  • Constructor Details

    • ClassPermission

      public ClassPermission( name)
      Creates a new ClassPermission object.
      Parameters:
      name - class to grant permission to
    • ClassPermission

      public ClassPermission( name,  actions)
      Creates a new ClassPermission object. This constructor exists for use by the Policy object to instantiate new Permission objects.
      Parameters:
      name - class to grant permission to
      actions - ignored
  • Method Details

    • implies

      public boolean implies( p)
      Overrides:
       in class 
    • newPermissionCollection

      public  newPermissionCollection()
      Overrides:
       in class