Class DefaultDeserializationTypeValidator
java.lang.Object
org.eximeebpms.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
FieldsModifier and TypeFieldDescriptionprotected static final Collection<String>protected static final Collection<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidextractElements(String allowedElements, Set<String> set) protected booleanisClassNameAllowed(String className) protected booleanisPackageAllowed(String className) protected booleanisPackageAllowed(String className, Collection<String> allowedPackages) voidsetAllowedClasses(String deserializationAllowedClasses) Set the allowed class namesvoidsetAllowedPackages(String deserializationAllowedPackages) Set the allowed package namesbooleanValidate the class name
-
Field Details
-
ALLOWED_PACKAGES
-
ALLOWED_CLASSES
-
allowedClasses
-
allowedPackages
-
-
Constructor Details
-
DefaultDeserializationTypeValidator
public DefaultDeserializationTypeValidator()
-
-
Method Details
-
setAllowedClasses
Description copied from interface:WhitelistingDeserializationTypeValidatorSet the allowed class names- Specified by:
setAllowedClassesin interfaceWhitelistingDeserializationTypeValidator
-
setAllowedPackages
Description copied from interface:WhitelistingDeserializationTypeValidatorSet the allowed package names- Specified by:
setAllowedPackagesin interfaceWhitelistingDeserializationTypeValidator
-
validate
Description copied from interface:DeserializationTypeValidatorValidate the class name- Specified by:
validatein interfaceDeserializationTypeValidator
-
isPackageAllowed
-
isPackageAllowed
-
isClassNameAllowed
-
extractElements
-