Package jenkins.security
Class CustomClassFilter.Static
- java.lang.Object
-
- jenkins.security.CustomClassFilter.Static
-
- All Implemented Interfaces:
ExtensionPoint
,CustomClassFilter
- Enclosing interface:
- CustomClassFilter
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension public static class CustomClassFilter.Static extends Object implements CustomClassFilter
Standard filter which pays attention to a system property. To use, specify a system propertyhudson.remoting.ClassFilter
containing a comma-separated list ofClass.getName()
to whitelist. Entries may also be preceded by!
to blacklist. Example:-Dhudson.remoting.ClassFilter=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
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,Boolean>
overrides
Map fromClass.getName()
to true to permit, false to reject.
-
Constructor Summary
Constructors Constructor Description Static()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
.
-
-
-
Field Detail
-
overrides
public final Map<String,Boolean> overrides
Map fromClass.getName()
to true to permit, false to reject. Unmentioned classes are not treated specially. Intentionallypublic
for possible mutation without restart by Groovy scripting.
-
-
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)
-
-