Package jenkins.security
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface jenkins.security.CustomClassFilter
CustomClassFilter.Contributed, CustomClassFilter.StaticNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidload()Determine whether a class should be permitted byClassFilter.isBlacklisted(Class)ofClassFilter.DEFAULT.Determine whether a class should be permitted byClassFilter.isBlacklisted(String)ofClassFilter.DEFAULT.
-
Constructor Details
-
Contributed
public Contributed()
-
-
Method Details
-
permits
Description copied from interface:CustomClassFilterDetermine whether a class should be permitted byClassFilter.isBlacklisted(Class)ofClassFilter.DEFAULT.- Specified by:
permitsin interfaceCustomClassFilter- 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
Description copied from interface:CustomClassFilterDetermine whether a class should be permitted byClassFilter.isBlacklisted(String)ofClassFilter.DEFAULT.- Specified by:
permitsin interfaceCustomClassFilter- 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
-