You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "nizhikov (via GitHub)" <gi...@apache.org> on 2026/08/03 12:07:57 UTC
[PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
nizhikov opened a new pull request, #13425:
URL: https://github.com/apache/ignite/pull/13425
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see tab `PR Check` at [TC.Bot - Instance 1](https://tcbot2.sbt-ignite-dev.ru/prs.html) or [TC.Bot - Instance 2](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #13425:
URL: https://github.com/apache/ignite/pull/13425#discussion_r3706943483
##########
modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java:
##########
@@ -715,18 +701,17 @@ public void setMarshallerMappingFileStoreDir(@Nullable final File marshallerMapp
/**
* Finds all system class names (JDK, Ignite and plugin classes) and processes them with the given consumer.
*
- * @param ldr Class loader.
* @param plugins Plugins (may be {@code null}).
* @param proc Class processor (class name consumer).
* @throws IOException In case of error.
*/
- private static void processSystemClasses(ClassLoader ldr, @Nullable Collection<PluginProvider> plugins,
+ private static void processSystemClasses(@Nullable Collection<PluginProvider> plugins,
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "petrov-mg (via GitHub)" <gi...@apache.org>.
petrov-mg commented on code in PR #13425:
URL: https://github.com/apache/ignite/pull/13425#discussion_r3706931277
##########
modules/binary/impl/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshallerImpl.java:
##########
@@ -66,23 +70,26 @@
* For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
*/
public class JdkMarshallerImpl extends AbstractNodeNameAwareMarshaller implements JdkMarshaller {
- /** Class name filter. */
- private final IgnitePredicate<String> clsFilter;
-
- /**
- * Default constructor.
- * Use this constructor with caution. It creates a JdkMarshaller instance that has class filtering DISABLED. Therefore,
- * if it will be used on the server side to unmarshal user data received from the network, it may lead to security breaches.
- */
- public JdkMarshallerImpl() {
- this(null);
- }
-
- /**
- * @param clsFilter Class name filter.
- */
- public JdkMarshallerImpl(@Nullable IgnitePredicate<String> clsFilter) {
- this.clsFilter = clsFilter;
+ /** */
+ private static final Object MUX = new Object();
Review Comment:
It seems that this is no longer required.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #13425:
URL: https://github.com/apache/ignite/pull/13425#discussion_r3706947117
##########
modules/binary/impl/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshallerImpl.java:
##########
@@ -66,23 +70,26 @@
* For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
*/
public class JdkMarshallerImpl extends AbstractNodeNameAwareMarshaller implements JdkMarshaller {
- /** Class name filter. */
- private final IgnitePredicate<String> clsFilter;
-
- /**
- * Default constructor.
- * Use this constructor with caution. It creates a JdkMarshaller instance that has class filtering DISABLED. Therefore,
- * if it will be used on the server side to unmarshal user data received from the network, it may lead to security breaches.
- */
- public JdkMarshallerImpl() {
- this(null);
- }
-
- /**
- * @param clsFilter Class name filter.
- */
- public JdkMarshallerImpl(@Nullable IgnitePredicate<String> clsFilter) {
- this.clsFilter = clsFilter;
+ /** */
+ private static final Object MUX = new Object();
Review Comment:
Removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13425:
URL: https://github.com/apache/ignite/pull/13425#issuecomment-5182469091
<!-- ignite-rolling-upgrade-check -->
## Possible compatibility issues. Please, check rolling upgrade cases
This PR modifies protected classes (with **Order** annotation).
Changes to these classes can break rolling upgrade compatibility.
**Affected files:**
- `modules/core/src/test/java/org/apache/ignite/marshaller/ObjectInputStreamFilteringTest.java`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #13425:
URL: https://github.com/apache/ignite/pull/13425#discussion_r3706936926
##########
modules/binary/api/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java:
##########
@@ -54,7 +51,7 @@ public class MarshallerUtils {
public static final String DEFAULT_WHITELIST_CLS_NAMES_FILE = "META-INF/classnames-default-whitelist.properties";
/** */
- private static final Object MUX = new Object();
+ private static final IgniteMarshallerClassFilter FILTER = new IgniteMarshallerClassFilter(classWhiteList(), classBlackList());
Review Comment:
Renamed to `IGNITE_MARSHALLER_CLASS_FILTER`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13425:
URL: https://github.com/apache/ignite/pull/13425#issuecomment-5178029435
<!-- ignite-rolling-upgrade-check -->
## Possible compatibility issues. Please, check rolling upgrade cases
This PR modifies protected classes (with **Order** annotation).
Changes to these classes can break rolling upgrade compatibility.
**Affected files:**
- `modules/core/src/test/java/org/apache/ignite/marshaller/ObjectInputStreamFilteringTest.java`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov merged PR #13425:
URL: https://github.com/apache/ignite/pull/13425
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "petrov-mg (via GitHub)" <gi...@apache.org>.
petrov-mg commented on code in PR #13425:
URL: https://github.com/apache/ignite/pull/13425#discussion_r3706904825
##########
modules/json/src/main/java/org/apache/ignite/internal/jackson/IgniteObjectMapper.java:
##########
@@ -96,7 +97,7 @@ public IgniteObjectMapper(GridKernalContext ctx) {
if (ctx != null) {
module.addDeserializer(BinaryObject.class, new IgniteBinaryObjectJsonDeserializer(ctx));
- IgnitePredicate<String> clsFilter = ctx.marshallerContext().classNameFilter();
+ IgnitePredicate<String> clsFilter = MarshallerUtils.classNameFilter();
Review Comment:
It seems that the following null check is no longer required.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "petrov-mg (via GitHub)" <gi...@apache.org>.
petrov-mg commented on code in PR #13425:
URL: https://github.com/apache/ignite/pull/13425#discussion_r3706731056
##########
modules/binary/api/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java:
##########
@@ -54,7 +51,7 @@ public class MarshallerUtils {
public static final String DEFAULT_WHITELIST_CLS_NAMES_FILE = "META-INF/classnames-default-whitelist.properties";
/** */
- private static final Object MUX = new Object();
+ private static final IgniteMarshallerClassFilter FILTER = new IgniteMarshallerClassFilter(classWhiteList(), classBlackList());
Review Comment:
It would be better to choose a more meaningful name.
##########
modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java:
##########
@@ -715,18 +701,17 @@ public void setMarshallerMappingFileStoreDir(@Nullable final File marshallerMapp
/**
* Finds all system class names (JDK, Ignite and plugin classes) and processes them with the given consumer.
*
- * @param ldr Class loader.
* @param plugins Plugins (may be {@code null}).
* @param proc Class processor (class name consumer).
* @throws IOException In case of error.
*/
- private static void processSystemClasses(ClassLoader ldr, @Nullable Collection<PluginProvider> plugins,
+ private static void processSystemClasses(@Nullable Collection<PluginProvider> plugins,
Review Comment:
We can also remove the line break.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-28946 Statically configured IgniteMarshallerClassFilter [ignite]
Posted by "ignitetcbot (via GitHub)" <gi...@apache.org>.
ignitetcbot commented on PR #13425:
URL: https://github.com/apache/ignite/pull/13425#issuecomment-5182150965
<!-- tcbot-analysis-comment chainBuildId=9250230 rerunBuildIds=none -->
### TCBot Test Analysis
* TeamCity: [--> Run :: All Results](https://ci2.ignite.apache.org/viewLog.html?buildId=9250230&buildTypeId=IgniteTests24Java8_RunAll)
* Branch: `pull/13425/head`
* Base: `master`
* Tested commit: [a44e8af](https://github.com/apache/ignite/pull/13425/commits/a44e8af67297e1f07df95df064fcab409f97d59c)
#### Possible Blockers (0)
No blockers found.
#### New Tests (27)
* [SPI (Discovery) 2](https://ci2.ignite.apache.org/viewLog.html?buildId=9252912): 7 tests
* `IgniteSpiDiscoverySelfTestSuite2`: `DiscoveryUnmarshalVulnerabilityTest$BlackListExcludedTest.test` - PASSED
* `IgniteSpiDiscoverySelfTestSuite2`: `DiscoveryUnmarshalVulnerabilityTest$BothListIncludedTest.test` - PASSED
* `IgniteSpiDiscoverySelfTestSuite2`: `DiscoveryUnmarshalVulnerabilityTest$ExploitDirectlyTest.test` - PASSED
* `IgniteSpiDiscoverySelfTestSuite2`: `DiscoveryUnmarshalVulnerabilityTest$NoListsTest.testNoLists` - PASSED
* `IgniteSpiDiscoverySelfTestSuite2`: `DiscoveryUnmarshalVulnerabilityTest$WhiteListIncludedTest.test` - PASSED
* `IgniteSpiDiscoverySelfTestSuite2`: `DiscoveryUnmarshalVulnerabilityTest$WhiteListExcludedTest.test` - PASSED
* `IgniteSpiDiscoverySelfTestSuite2`: `DiscoveryUnmarshalVulnerabilityTest$BlackListIncludedTest.test` - PASSED
* [Basic 1](https://ci2.ignite.apache.org/viewLog.html?buildId=9252900): 6 tests
* `IgniteBasicTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$WhiteListIncludedTest.test` - PASSED
* `IgniteBasicTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$WhiteListExcludedTest.test` - PASSED
* `IgniteBasicTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$BlackListIncludedTest.test` - PASSED
* `IgniteBasicTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$BlackListExcludedTest.test` - PASSED
* `IgniteBasicTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$BothListIncludedTest.test` - PASSED
* `IgniteBasicTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$NoListsTest.test` - PASSED
* [Cache 13](https://ci2.ignite.apache.org/viewLog.html?buildId=9250094): 1 tests
* `IgniteCacheTestSuite13`: `SystemViewCacheExpiryPolicyTest.testCacheViewExpiryPolicy[factory=javax.cache.configuration.FactoryBuilder$SingletonFactory@3d3c886f, actual=SingletonFactory [expiryPlc=EternalExpiryPolicy [create=ETERNAL]]]` - PASSED
* [Java Client](https://ci2.ignite.apache.org/viewLog.html?buildId=9252894): 7 tests
* `IgniteClientTestSuite`: `JettyRestProcessorClassFilterTest.testPutIncorrectJson` - PASSED
* `IgniteClientTestSuite`: `TcpRestUnmarshalVulnerabilityTest$NoListTest.test` - PASSED
* `IgniteClientTestSuite`: `TcpRestUnmarshalVulnerabilityTest$WhiteListIncludedTest.test` - PASSED
* `IgniteClientTestSuite`: `TcpRestUnmarshalVulnerabilityTest$WhiteListExcludedTest.test` - PASSED
* `IgniteClientTestSuite`: `TcpRestUnmarshalVulnerabilityTest$BlackListIncludedTest.test` - PASSED
* `IgniteClientTestSuite`: `TcpRestUnmarshalVulnerabilityTest$BlackListExcludedTest.test` - PASSED
* `IgniteClientTestSuite`: `TcpRestUnmarshalVulnerabilityTest$BothListIncludedTest.test` - PASSED
* [Streamers](https://ci2.ignite.apache.org/viewLog.html?buildId=9252896): 6 tests
* `IgniteStreamSelfTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$NoListsTest.test` - PASSED
* `IgniteStreamSelfTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$WhiteListIncludedTest.test` - PASSED
* `IgniteStreamSelfTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$WhiteListExcludedTest.test` - PASSED
* `IgniteStreamSelfTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$BlackListIncludedTest.test` - PASSED
* `IgniteStreamSelfTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$BlackListExcludedTest.test` - PASSED
* `IgniteStreamSelfTestSuite`: `SocketStreamerUnmarshalVulnerabilityTest$BothListIncludedTest.test` - PASSED
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org