Class DefaultDeserializationTypeValidator
java.lang.Object
org.camunda.bpm.engine.impl.runtime.DefaultDeserializationTypeValidator
- All Implemented Interfaces:
DeserializationTypeValidator
,WhitelistingDeserializationTypeValidator
public class DefaultDeserializationTypeValidator
extends Object
implements WhitelistingDeserializationTypeValidator
Validate a type against a list of allowed packages and classes. Allows a basic
set of packages and classes without known security issues based on Jackson
Databind's SubTypeValidator.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Collection<String>
protected static final Collection<String>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
extractElements
(String allowedElements, Set<String> set) protected boolean
isClassNameAllowed
(String className) protected boolean
isPackageAllowed
(String className) protected boolean
isPackageAllowed
(String className, Collection<String> allowedPackages) void
setAllowedClasses
(String deserializationAllowedClasses) Set the allowed class namesvoid
setAllowedPackages
(String deserializationAllowedPackages) Set the allowed package namesboolean
Validate the class name
-
Field Details
-
ALLOWED_PACKAGES
-
ALLOWED_CLASSES
-
allowedClasses
-
allowedPackages
-
-
Constructor Details
-
DefaultDeserializationTypeValidator
public DefaultDeserializationTypeValidator()
-
-
Method Details
-
setAllowedClasses
Description copied from interface:WhitelistingDeserializationTypeValidator
Set the allowed class names- Specified by:
setAllowedClasses
in interfaceWhitelistingDeserializationTypeValidator
-
setAllowedPackages
Description copied from interface:WhitelistingDeserializationTypeValidator
Set the allowed package names- Specified by:
setAllowedPackages
in interfaceWhitelistingDeserializationTypeValidator
-
validate
Description copied from interface:DeserializationTypeValidator
Validate the class name- Specified by:
validate
in interfaceDeserializationTypeValidator
-
isPackageAllowed
-
isPackageAllowed
-
isClassNameAllowed
-
extractElements
-