Class CustomClassFilter.Contributed

java.lang.Object
jenkins.security.CustomClassFilter.Contributed
All Implemented Interfaces:
ExtensionPoint, CustomClassFilter
Enclosing interface:
CustomClassFilter

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension public static class CustomClassFilter.Contributed extends Object implements CustomClassFilter
Standard filter which can load whitelists and blacklists from plugins. To use, add a resource META-INF/hudson.remoting.ClassFilter to your plugin. Each line should be the Class.getName() of a class to whitelist. Or you may blacklist a class by preceding its name with !. Example:
 com.google.common.collect.LinkedListMultimap
 !com.acme.illadvised.YoloReflectionFactory$Handle
 
  • Constructor Details

    • Contributed

      public Contributed()
  • Method Details

    • permits

      public Boolean permits(Class<?> c)
      Description copied from interface: CustomClassFilter
      Determine whether a class should be permitted by ClassFilter.isBlacklisted(Class) of ClassFilter.DEFAULT.
      Specified by:
      permits in interface CustomClassFilter
      Parameters:
      c - the class
      Returns:
      true to permit it when it would normally be rejected (for example due to having a custom serialization method and being from a third-party library); false to reject it when it would normally be permitted; null to express no opinion (the default)
    • permits

      public Boolean permits(String name)
      Description copied from interface: CustomClassFilter
      Determine whether a class should be permitted by ClassFilter.isBlacklisted(String) of ClassFilter.DEFAULT.
      Specified by:
      permits in interface CustomClassFilter
      Parameters:
      name - a class name
      Returns:
      true to permit it when it would normally be rejected (currently useless); false to reject it when it would normally be permitted (currently due to ClassFilter.STANDARD; null to express no opinion (the default)
    • load

      @Initializer(after=PLUGINS_PREPARED, before=PLUGINS_STARTED, fatal=false) public static void load() throws IOException
      Throws:
      IOException