Package com.atlassian.velocity
Class JiraAllowlistIntrospector
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
com.atlassian.velocity.JiraAllowlistIntrospector
- All Implemented Interfaces:
- org.apache.velocity.util.introspection.SecureIntrospectorControl
public class JiraAllowlistIntrospector
extends com.atlassian.velocity.allowlist.uberspect.PluginAwareSecureIntrospector
Extends PluginAwareSecureIntrospector to manage a security allowlist specifically for Atlassian Jira Velocity environment.
 This class enhances security by controlling access to methods within the Velocity templates, based on a configured allowlist
 in velocity-default.properties.
 It listens to the plugin startup events to initialize itself and ensures that only allowed methods can be executed
 within the Velocity context, it also registers allowlists from every plugin that is installed in JIRA.
- Since:
- v10.0.0
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enum
- 
Field SummaryFields inherited from class com.atlassian.velocity.allowlist.uberspect.PluginAwareSecureIntrospectorALLOWLIST_DEBUG_PROPERTY, ALLOWLIST_DEBUG_PROPERTY_ALT, ALLOWLIST_EXTRA_PROPERTY, ALLOWLIST_EXTRA_PROPERTY_ALTFields inherited from class org.apache.velocity.util.introspection.IntrospectorBaselog
- 
Constructor SummaryConstructorsConstructorDescriptionJiraAllowlistIntrospector(org.apache.velocity.runtime.log.Log log, org.apache.velocity.runtime.RuntimeServices runtimeServices) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanisAllowlistedClassPackageInternal(Class<?> clazz) protected booleanisAllowlistedMethodInternal(Method method) protected booleanisClassPackageRestricted(Class<?> clazz) protected booleanisClassRestricted(Class<?> clazz) protected booleanvoidonPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event) voidonPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) voidvoidMethods inherited from class com.atlassian.velocity.allowlist.uberspect.PluginAwareSecureIntrospectorisAllowlistDebugMode, isAllowlistedClassPackageCached, isAllowlistedMethodCached, loadClass, setPluginAllowlist, toMethodStrMethods inherited from class org.apache.velocity.util.introspection.SecureIntrospectorImplcheckObjectExecutePermission, checkObjectExecutePermission, getMethod, getMethod, isAllowlisted, isAllowlistedClass, isAllowlistedInternal, isAllowlistEnabled, isExecutionRestricted, isPackageMatches, isParametersRestricted, isParamsContainPathTraversal, isRestrictedClass, isRestrictedClassPackageCached, isRestrictedClassPackageInternal, resolveArrayClass, toClassSet, toMethodSet, toPackageName, toParsedSet, topLevelChecks, toValidatedClassSetMethods inherited from class org.apache.velocity.util.introspection.IntrospectorBasegetIntrospectorCache
- 
Constructor Details- 
JiraAllowlistIntrospectorpublic JiraAllowlistIntrospector(org.apache.velocity.runtime.log.Log log, org.apache.velocity.runtime.RuntimeServices runtimeServices) 
 
- 
- 
Method Details- 
onPluginFrameworkStarted@EventListener public void onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) - Overrides:
- onPluginFrameworkStartedin class- com.atlassian.velocity.allowlist.uberspect.PluginAwareSecureIntrospector
 
- 
onPluginEnabled@EventListener public void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event) 
- 
getStatus
- 
resetIntrospectorStatepublic void resetIntrospectorState()
- 
postInitIntrospectorSetuppublic void postInitIntrospectorSetup()
- 
isAllowlistedMethodInternal- Overrides:
- isAllowlistedMethodInternalin class- com.atlassian.velocity.allowlist.uberspect.PluginAwareSecureIntrospector
 
- 
isClassPackageRestricted- Overrides:
- isClassPackageRestrictedin class- org.apache.velocity.util.introspection.SecureIntrospectorImpl
 
- 
isAllowlistedClassPackageInternal- Overrides:
- isAllowlistedClassPackageInternalin class- org.apache.velocity.util.introspection.SecureIntrospectorImpl
 
- 
isClassRestricted- Overrides:
- isClassRestrictedin class- org.apache.velocity.util.introspection.SecureIntrospectorImpl
 
- 
isIntrospectorEnabledprotected boolean isIntrospectorEnabled()- Overrides:
- isIntrospectorEnabledin class- com.atlassian.velocity.allowlist.uberspect.PluginAwareSecureIntrospector
 
 
-