This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new a1356d93c7 Add check status option (#11292)
a1356d93c7 is described below

commit a1356d93c795406fafd58b627381a639d8973506
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Jan 13 09:48:47 2023 +0800

    Add check status option (#11292)
---
 .../main/java/org/apache/dubbo/common/constants/CommonConstants.java  | 2 ++
 .../java/org/apache/dubbo/common/utils/SerializeSecurityManager.java  | 4 ++++
 2 files changed, 6 insertions(+)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java
 
b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java
index a3f0dc2583..77edb2b3de 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java
@@ -431,6 +431,8 @@ public interface CommonConstants {
 
     String SERIALIZE_ALLOW_LIST_FILE_PATH = "security/serialize.allowlist";
 
+    String SERIALIZE_CHECK_STATUS_KEY = 
"dubbo.application.serialize-check-status";
+
     String QOS_LIVE_PROBE_EXTENSION = "dubbo.application.liveness-probe";
 
     String QOS_READY_PROBE_EXTENSION = "dubbo.application.readiness-probe";
diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/SerializeSecurityManager.java
 
b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/SerializeSecurityManager.java
index 6cea23a58d..f4ce027c91 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/SerializeSecurityManager.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/SerializeSecurityManager.java
@@ -37,6 +37,7 @@ import org.apache.dubbo.common.logger.LoggerFactory;
 import org.apache.dubbo.rpc.model.FrameworkModel;
 
 import static 
org.apache.dubbo.common.constants.CommonConstants.SERIALIZE_ALLOW_LIST_FILE_PATH;
+import static 
org.apache.dubbo.common.constants.CommonConstants.SERIALIZE_CHECK_STATUS_KEY;
 import static 
org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_IO_EXCEPTION;
 import static 
org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_INTERRUPTED;
 
@@ -74,6 +75,9 @@ public class SerializeSecurityManager {
                     logger.error(COMMON_IO_EXCEPTION, "", "",  "Failed to load 
allow class list! Will ignore allow lis from " + u, e);
                 }
             }
+
+            this.checkStatus = 
SerializeCheckStatus.valueOf(System.getProperty(SERIALIZE_CHECK_STATUS_KEY, 
AllowClassNotifyListener.DEFAULT_STATUS.name()));
+            logger.info("Serialize check level: " + checkStatus.name());
         } catch (InterruptedException e) {
             logger.error(INTERNAL_INTERRUPTED, "", "",  "Failed to load allow 
class list! Will ignore allow list from configuration.", e);
             Thread.currentThread().interrupt();

Reply via email to