From 098b92b17494e10a8f45ba4509fffc087791b623 Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 23 Apr 2024 15:15:47 -0700 Subject: [PATCH] update some spacing, etc --- .../Common/SanitizerDictionary.cs | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs index dd1598815ee..878c8df4349 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs @@ -14,10 +14,13 @@ public class RegisteredSanitizer public string Id { get; set; } public RecordedTestSanitizer Sanitizer { get; set; } - public RegisteredSanitizer(RecordedTestSanitizer sanitizer, string id) + public string Description { get; set; } + + public RegisteredSanitizer(RecordedTestSanitizer sanitizer, string id, string description = null) { Id = id; Sanitizer = sanitizer; + Description = description; } } @@ -47,16 +50,16 @@ public SanitizerDictionary() { /* * The below list has been grouped and labelled with some room for expansion. As such: * - * General sanitizers = 1XXX - * Header sanitizers = 2XXX - * Body sanitizers = 3XXX - * URI, special, any other type = 4XXX + * General sanitizers = 1XXX + * Header sanitizers = 2XXX + * Body sanitizers = 3XXX + * URI, special, other = 4XXX * * */ public List DefaultSanitizerList = new List { - #region general + #region GeneralRegex // basic RecordedTestSanitizer handles Authorization header new RegisteredSanitizer( new RecordedTestSanitizer(), @@ -84,14 +87,16 @@ public SanitizerDictionary() { ), new RegisteredSanitizer( new GeneralRegexSanitizer(regex: "common/userrealm/(?[^/\\.]+)", groupForReplace: "realm"), - "AZSDK1005" + "AZSDK1005", + "ACS Identity leverages these strings to store identity information." ), new RegisteredSanitizer( new GeneralRegexSanitizer(regex: "/identities/(?[^/?]+)", groupForReplace: "realm"), - "AZSDK1006" + "AZSDK1006", + "ACS Identity leverages these strings to store identity information." ), #endregion - #region header + #region HeaderRegex new RegisteredSanitizer( new HeaderRegexSanitizer("api-key"), "AZSDK2001" @@ -275,9 +280,8 @@ public SanitizerDictionary() { "AZSDK3013" ), #endregion - - #region BodyKey - new RegisteredSanitizer( + #region BodyKey + new RegisteredSanitizer( new BodyKeySanitizer("$..access_token"), "AZSDK3400" ), @@ -666,7 +670,6 @@ public SanitizerDictionary() { "AZSDK3496" ), #endregion - #region UriRegex new RegisteredSanitizer( new UriRegexSanitizer(regex: "sig=(?[^&]+)", groupForReplace: "sig"), @@ -680,10 +683,9 @@ public SanitizerDictionary() { new UriRegexSanitizer(regex: "(?:(sv|sig|se|srt|ss|sp)=)(?[^&\\\"\\s]*)", groupForReplace: "secret"), "AZSDK4002" ), - #endregion - - #region RemoveHeader - new RegisteredSanitizer( + #endregion + #region RemoveHeader + new RegisteredSanitizer( new RemoveHeaderSanitizer("Telemetry-Source-Time"), "AZSDK4003" ), @@ -692,7 +694,6 @@ public SanitizerDictionary() { "AZSDK4004" ), #endregion - }; ///