use of com.sequenceiq.environment.configuration.telemetry.AccountTelemetryConfig in project cloudbreak by hortonworks.
the class AccountTelemetryServiceTest method createAccountTelemetryConfig.
private AccountTelemetryConfig createAccountTelemetryConfig() {
AccountTelemetryConfig config = new AccountTelemetryConfig();
List<AnonymizationRule> defaultRules = new ArrayList<>();
defaultRules.add(createRule("\\b([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-\\._]*[A-Za-z0-9])@(([A-Za-z0-9]|" + "[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])\\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])\\b", "email@redacted.host"));
defaultRules.add(createRule("\\d{4}[^\\w]\\d{4}[^\\w]\\d{4}[^\\w]\\d{4}", "XXXX-XXXX-XXXX-XXXX"));
defaultRules.add(createRule("\\d{3}[^\\w]\\d{2}[^\\w]\\d{4}", "XXX-XX-XXXX"));
defaultRules.add(createRule("FPW\\:\\s+[\\w|\\W].*", "FPW: [REDACTED]"));
defaultRules.add(createRule("cdpHashedPassword=.*[']", "[CDP PWD ATTRS REDACTED]"));
config.setRules(defaultRules);
return config;
}
Aggregations