Class PluginAwareSecureIntrospector
java.lang.Object
org.apache.velocity.util.introspection.IntrospectorBase
org.apache.velocity.util.introspection.Introspector
org.apache.velocity.util.introspection.SecureIntrospectorImpl
com.atlassian.velocity.allowlist.uberspect.PluginAwareSecureIntrospector
- All Implemented Interfaces:
org.apache.velocity.util.introspection.SecureIntrospectorControl
public class PluginAwareSecureIntrospector
extends org.apache.velocity.util.introspection.SecureIntrospectorImpl
Extension of
SecureIntrospectorImpl which can additionally consult the PluginAllowlist. In addition
to configuring this Introspector for use in the Velocity engine, the engine internal instance must then be retrieved
and initialised by calling setPluginAllowlist(com.atlassian.velocity.allowlist.api.internal.PluginAllowlist) and registered as an event listener.- Since:
- 6.0.0
-
Field Summary
FieldsFields inherited from class org.apache.velocity.util.introspection.IntrospectorBase
log -
Constructor Summary
ConstructorsConstructorDescriptionPluginAwareSecureIntrospector(org.apache.velocity.runtime.log.Log log, org.apache.velocity.runtime.RuntimeServices runtimeServices) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanisAllowlistedClassPackageCached(Class<?> clazz) protected booleanisAllowlistedMethodCached(Method method) protected booleanprotected Class<?>voidonPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) voidsetPluginAllowlist(PluginAllowlist pluginAllowlist) Methods inherited from class org.apache.velocity.util.introspection.SecureIntrospectorImpl
checkObjectExecutePermission, checkObjectExecutePermission, getMethod, getMethod, isAllowlisted, isAllowlistedClass, isAllowlistedClassPackageInternal, isAllowlistedInternal, isAllowlistedMethodInternal, isAllowlistEnabled, isClassPackageRestricted, isClassRestricted, isExecutionRestricted, isPackageMatches, isParametersRestricted, isParamsContainPathTraversal, isRestrictedClass, isRestrictedClassPackageCached, isRestrictedClassPackageInternal, resolveArrayClass, toClassSet, toMethodSet, toPackageName, toParsedSet, topLevelChecks, toValidatedClassSetMethods inherited from class org.apache.velocity.util.introspection.IntrospectorBase
getIntrospectorCache
-
Field Details
-
ALLOWLIST_DEBUG_PROPERTY
- See Also:
-
ALLOWLIST_DEBUG_PROPERTY_ALT
- See Also:
-
-
Constructor Details
-
PluginAwareSecureIntrospector
public PluginAwareSecureIntrospector(org.apache.velocity.runtime.log.Log log, org.apache.velocity.runtime.RuntimeServices runtimeServices)
-
-
Method Details
-
setPluginAllowlist
-
loadClass
- Overrides:
loadClassin classorg.apache.velocity.util.introspection.SecureIntrospectorImpl- Throws:
ClassNotFoundException
-
onPluginFrameworkStarted
@EventListener public void onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) -
isIntrospectorEnabled
protected boolean isIntrospectorEnabled()- Overrides:
isIntrospectorEnabledin classorg.apache.velocity.util.introspection.SecureIntrospectorImpl
-
isAllowlistDebugMode
protected boolean isAllowlistDebugMode()- Overrides:
isAllowlistDebugModein classorg.apache.velocity.util.introspection.SecureIntrospectorImpl
-
isAllowlistedClassPackageCached
- Overrides:
isAllowlistedClassPackageCachedin classorg.apache.velocity.util.introspection.SecureIntrospectorImpl
-
isAllowlistedMethodCached
- Overrides:
isAllowlistedMethodCachedin classorg.apache.velocity.util.introspection.SecureIntrospectorImpl
-