diff --git a/src/main/java/org/akhq/configs/DataMasking.java b/src/main/java/org/akhq/configs/DataMasking.java index d212b69d5..ff601eff1 100644 --- a/src/main/java/org/akhq/configs/DataMasking.java +++ b/src/main/java/org/akhq/configs/DataMasking.java @@ -10,7 +10,6 @@ @Data public class DataMasking { List filters = new ArrayList<>(); // regex filters still use `filters` for backwards compatibility - DataMaskingMode mode = DataMaskingMode.REGEX; // set this by default to REGEX for backwards compatibility for current regex filtering users who haven't defined this property. List jsonFilters = new ArrayList<>(); String jsonMaskReplacement = "xxxx"; boolean cachingEnabled = false; diff --git a/src/main/java/org/akhq/configs/DataMaskingMode.java b/src/main/java/org/akhq/configs/DataMaskingMode.java deleted file mode 100644 index 26e6260f2..000000000 --- a/src/main/java/org/akhq/configs/DataMaskingMode.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.akhq.configs; - -public enum DataMaskingMode { - // Use the existing regex-based filtering - REGEX, - // Use filtering where by default all fields of all records are masked, with fields to unmask defined in allowlists - JSON_MASK_BY_DEFAULT, - // Use filtering where by default no fields of any records are masked, with fields to mask explicitly denied - JSON_SHOW_BY_DEFAULT, - // No masker at all, best performance - NONE -} diff --git a/src/test/java/org/akhq/utils/DefaultMaskerSettingTest.java b/src/test/java/org/akhq/utils/DefaultMaskerSettingTest.java index 5532e049a..4e531c847 100644 --- a/src/test/java/org/akhq/utils/DefaultMaskerSettingTest.java +++ b/src/test/java/org/akhq/utils/DefaultMaskerSettingTest.java @@ -2,28 +2,18 @@ import io.micronaut.test.extensions.junit5.annotation.MicronautTest; import jakarta.inject.Inject; -import org.akhq.configs.DataMasking; import org.junit.jupiter.api.Test; -import static org.akhq.configs.DataMaskingMode.REGEX; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @MicronautTest public class DefaultMaskerSettingTest { - @Inject - DataMasking dataMasking; - @Inject Masker masker; @Test void defaultValuesShouldUseRegexForBackwardsCompatibility() { - assertEquals( - REGEX, - dataMasking.getMode() - ); assertInstanceOf(RegexMasker.class, masker); } }