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 resourceMETA-INF/hudson.remoting.ClassFilter
to your plugin. Each line should be theClass.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.Static
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description Contributed()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
load()
Boolean
permits(Class<?> c)
Determine whether a class should be permitted byClassFilter.isBlacklisted(Class)
ofClassFilter.DEFAULT
.Boolean
permits(String name)
Determine whether a class should be permitted byClassFilter.isBlacklisted(String)
ofClassFilter.DEFAULT
.
-
-
-
Method Detail
-
permits
public Boolean permits(Class<?> c)
Description copied from interface:CustomClassFilter
Determine whether a class should be permitted byClassFilter.isBlacklisted(Class)
ofClassFilter.DEFAULT
.- Specified by:
permits
in 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
public Boolean permits(String name)
Description copied from interface:CustomClassFilter
Determine whether a class should be permitted byClassFilter.isBlacklisted(String)
ofClassFilter.DEFAULT
.- Specified by:
permits
in 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
-
-