For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Securing Data Deserialization

Restrict deserialization in GridGain with the IGNITE_MARSHALLER_WHITELIST and IGNITE_MARSHALLER_BLACKLIST system properties.

Serialized data is vulnerable to malicious data attacks if an attacker finds a way to add malicious code to the classpath of your cluster nodes. Best practice is to make sure that the access to the cluster is protected and granted only to a limited group of people.

However, if the attacker breaks through to your deployment environment, GridGain provides the ability to specify IGNITE_MARSHALLER_WHITELIST and IGNITE_MARSHALLER_BLACKLIST as system properties. These properties allow you to define a list of classes that will be allowed/disallowed for safe deserialization.

IGNITE_MARSHALLER_WHITELIST

To use IGNITE_MARSHALLER_WHITELIST, create a file containing the list of files allowed for deserialization. For example, a text file (whitelist.txt) would look like so:

whitelist.txt
ignite.myexamples.model.Address
ignite.myexamples.model.Person
...

Then, set the system property when you run your application, or programmatically:

-DIGNITE_MARSHALLER_WHITELIST=path/to/whitelist.txt
System.setProperty(IGNITE_MARSHALLER_WHITELIST, "Path/to/whitelist.txt");

Substitute path/to/whitelist.txt with actual path to your whitelist file.

When the IGNITE_MARSHALLER_WHITELIST system property is used, an attempt to deserialize any file not on the whitelist will result in an exception:

Text
Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Deserialization of class ignite.myexamples.model.Organization is disallowed.

IGNITE_MARSHALLER_BLACKLIST

To use IGNITE_MARSHALLER_BLACKLIST, create a file containing the list of files disallowed for deserialization. For example, a text file (blacklist.txt) would look like so:

blacklist.txt
ignite.myexamples.model.SomeFile
ignite.myexamples.model.SomeOtherFile
...

Then, set the system property when you run your application, or programmatically:

Substitute path/to/blacklist.txt with actual path to your blacklist file.

When the IGNITE_MARSHALLER_BLACKLIST system property is used, an attempt to deserialize any file mentioned on the blacklist will result in an exception:

Thin Client Continuous Query Filters

The whitelist and blacklist also apply to remote filters of continuous queries started from thin clients. A thin client can pass a remote filter by class name, for example with FactoryBuilder.factoryOf(MyFilter.class) in the Java thin client, or as a Java filter from the .NET and C++ thin clients. In this case, the server node checks the class name against IGNITE_MARSHALLER_WHITELIST and IGNITE_MARSHALLER_BLACKLIST before it loads the class. A filter class passed by name must implement javax.cache.event.CacheEntryEventFilter.

If the class is not allowed, the continuous query fails with a security error: Deserialization of class <class name> is disallowed.

GridGain 8.9.39 and earlier did not check filter classes passed by name. If you use IGNITE_MARSHALLER_WHITELIST, add the remote filter classes of your thin client continuous queries to the whitelist before upgrading.

This page is: Copyright © 2026 MariaDB. All rights reserved.

Last updated

Was this helpful?