[ 
https://issues.apache.org/jira/browse/ARTEMIS-4167?focusedWorklogId=939349&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-939349
 ]

ASF GitHub Bot logged work on ARTEMIS-4167:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Oct/24 03:01
            Start Date: 22/Oct/24 03:01
    Worklog Time Spent: 10m 
      Work Description: swerner0 commented on code in PR #5307:
URL: https://github.com/apache/activemq-artemis/pull/5307#discussion_r1809780434


##########
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ObjectInputFilterFactory.java:
##########
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.jms.client;
+
+import java.io.ObjectInputFilter;
+import java.util.Map;
+import java.util.Objects;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class ObjectInputFilterFactory {
+
+   public static final String SERIAL_FILTER_PROPERTY            = 
"org.apache.activemq.artemis.jms.serialFilter";
+   public static final String SERIAL_FILTER_CLASS_NAME_PROPERTY = 
"org.apache.activemq.artemis.jms.serialFilterClassName";

Review Comment:
   I wasn't sure the best way of relaying the information as the URL, system 
properties and resource adapter had separate sections. I stated `Configure the 
same way via url, system properties, resource adapter, or set directly on 
ActiveMQConnectionFactory` in hopes they would know what to do by looking above 
and substituting denyList or allowList with the one of the two new variable 
names





Issue Time Tracking
-------------------

    Worklog Id:     (was: 939349)
    Time Spent: 3.5h  (was: 3h 20m)

> Enhance deserialization filter beyond black/whitelist functionality
> -------------------------------------------------------------------
>
>                 Key: ARTEMIS-4167
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4167
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>            Reporter: Scott Werner
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Now that Artemis is Java 11+ compatible, there is now the ability to set an 
> ObjectInputFilter on an ObjectInputStream. There are also built in methods to 
> generate filters similar to the current syntax and offers many other features 
> out of the box. A global jvm property (jdk.serialFilter) can be set, but this 
> is quite restrictive. I suggest adding a new serial filter pattern and class 
> name of an ObjectInputFilter implementation, everywhere blacklist/whitelist 
> exist today. In time we can look into converting the existing black/whitelist 
> to the new format or just deprecating as the semantics are a bit different 
> and may not be able to make it 100% compatible.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to