public abstract class AbstractSerializationSecurityManager extends Object implements SerializationSecurityManager
Modifier and Type | Field and Description |
---|---|
protected com.google.common.base.Optional<Set<String>> |
completeClassNameWhitelist |
protected List<String> |
pluginProvidedClassNameWhitelist |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSerializationSecurityManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.plugin.event.PluginEventManager pluginEventManager,
SystemSerializableClassWhitelistProvider systemSerializableClassWhitelistProvider) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addWhitelistedClassNames(com.google.common.collect.ImmutableSet.Builder<String> whitelistBuilder)
This method should be overridden by implementations to modify class whitelist.
|
Set<String> |
getClassNameWhitelist()
Get set of class names that are whitelisted for purpose of serialization.
|
boolean |
isBlacklisted(Class<?> type,
SerializationSecurityMethod method)
returns true for classes that should not be serialised or deserialised.
|
void |
pluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent pluginDisabledEvent) |
void |
pluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent) |
void |
pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent pluginModuleDisabledEvent) |
void |
pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent pluginModuleEnabledEvent) |
void |
pluginUninstalled(com.atlassian.plugin.event.events.PluginUninstalledEvent pluginUninstalledEvent) |
void |
pluginUpgraded(com.atlassian.plugin.event.events.PluginUpgradedEvent pluginUpgradedEvent) |
protected void |
recalculateMasterClassWhitelist()
This method should be called by implementations after any of the class whitelist sources has changed.
|
void |
registerPluginEventListeners() |
void |
unregisterPluginEventListeners()
Unregistering event listener on PreDestroy can save from processing multiple events when all plugins will be unregistered
|
protected volatile com.google.common.base.Optional<Set<String>> completeClassNameWhitelist
protected AbstractSerializationSecurityManager(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager, SystemSerializableClassWhitelistProvider systemSerializableClassWhitelistProvider)
public Set<String> getClassNameWhitelist()
SerializationSecurityManager
getClassNameWhitelist
in interface SerializationSecurityManager
public boolean isBlacklisted(@NotNull Class<?> type, @NotNull SerializationSecurityMethod method)
SerializationSecurityManager
isBlacklisted
in interface SerializationSecurityManager
@PostConstruct public void registerPluginEventListeners() throws Exception
Exception
@PreDestroy public void unregisterPluginEventListeners() throws Exception
Exception
public void pluginUninstalled(com.atlassian.plugin.event.events.PluginUninstalledEvent pluginUninstalledEvent)
public void pluginUpgraded(com.atlassian.plugin.event.events.PluginUpgradedEvent pluginUpgradedEvent)
public void pluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent)
public void pluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent pluginDisabledEvent)
public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent pluginModuleEnabledEvent)
public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent pluginModuleDisabledEvent)
protected final void recalculateMasterClassWhitelist()
protected abstract void addWhitelistedClassNames(@NotNull com.google.common.collect.ImmutableSet.Builder<String> whitelistBuilder)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.