dataScrubbingRelayPiiConfig.ts 695 B

123456789101112131415161718192021222324252627
  1. import {
  2. Applications,
  3. MethodType,
  4. PiiConfig,
  5. RuleType,
  6. } from 'sentry/views/settings/components/dataScrubbing/types';
  7. export function DataScrubbingRelayPiiConfig(): {
  8. applications: Applications;
  9. rules: Record<string, PiiConfig>;
  10. } {
  11. return {
  12. rules: {
  13. 0: {
  14. type: RuleType.PASSWORD,
  15. redaction: {method: MethodType.REPLACE, text: 'Scrubbed'},
  16. },
  17. 1: {type: RuleType.CREDITCARD, redaction: {method: MethodType.MASK}},
  18. 2: {
  19. type: RuleType.PATTERN,
  20. pattern: '[a-zA-Z0-9]+',
  21. redaction: {method: MethodType.REPLACE, text: 'Placeholder'},
  22. },
  23. },
  24. applications: {password: ['0'], $message: ['1', '2']},
  25. };
  26. }