227 references to FakeTaxonomy
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (43)
Logging\IncomingHttpRouteUtilityTests.cs (27)
60Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("userId")); 98Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("userId")); 100Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("teamId")); 138Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("userId")); 140Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("teamId")); 179{ "testKey", FakeTaxonomy.PrivateData } 184Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("testKey")); 222{ "testKey", FakeTaxonomy.PrivateData } 227Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("testKey")); 308{ "testKey", FakeTaxonomy.PrivateData }, 309{ "teamId", FakeTaxonomy.PrivateData } 316Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("userId")); 318Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("teamId")); 320Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("testKey")); 356{ "userId", FakeTaxonomy.PublicData } 363Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("userId")); 365Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("teamId")); 405Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("userId")); 407Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("teamId")); 409d.Add("testKey", FakeTaxonomy.PrivateData); 410d.Add("userId", FakeTaxonomy.PublicData); 414Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("userId")); 416Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("teamId")); 440{ "testKey", FakeTaxonomy.PrivateData } 445Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("testKey")); 462{ "testKey", FakeTaxonomy.PrivateData } 467Assert.Equal(FakeTaxonomy.PrivateData, sensitiveParameters.GetValueOrDefault("testKey"));
Logging\RequestHeadersEnricherTests.cs (16)
84{ HeaderKey1, FakeTaxonomy.PrivateData }, 85{ HeaderKey4, FakeTaxonomy.PublicData } 90redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.PublicData)) 92redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.PrivateData)) 117{ HeaderKey1, FakeTaxonomy.PrivateData }, 118{ HeaderKey2, FakeTaxonomy.PublicData } 123redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.PrivateData)) 147{ HeaderKey1, FakeTaxonomy.PublicData }, 148{ HeaderKey3, FakeTaxonomy.PublicData } 174{ HeaderKey1, FakeTaxonomy.PublicData }, 175{ headerKey2, FakeTaxonomy.PublicData } 199{ HeaderKey1, FakeTaxonomy.PublicData } 226{ HeaderKey1, FakeTaxonomy.PublicData } 267{ HeaderKey1, FakeTaxonomy.PublicData } 272redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.PublicData)) 274redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.PrivateData))
Microsoft.Extensions.Compliance.Abstractions.Tests (12)
Classification\DataClassificationSetTests.cs (12)
15var dc1 = new DataClassificationSet(FakeTaxonomy.PublicData); 16var dc2 = new DataClassificationSet(new[] { FakeTaxonomy.PublicData }); 17var dc3 = new DataClassificationSet(new List<DataClassification> { FakeTaxonomy.PublicData }); 18var dc4 = (DataClassificationSet)FakeTaxonomy.PublicData; 19var dc5 = DataClassificationSet.FromDataClassification(FakeTaxonomy.PublicData); 26var dc6 = dc1.Union(FakeTaxonomy.PrivateData); 37var dc1 = new DataClassificationSet(FakeTaxonomy.PublicData); 38var dc2 = new DataClassificationSet(new[] { FakeTaxonomy.PublicData }); 39var dc3 = new DataClassificationSet(new List<DataClassification> { FakeTaxonomy.PublicData }); 40var dc4 = (DataClassificationSet)FakeTaxonomy.PublicData; 41var dc5 = DataClassificationSet.FromDataClassification(FakeTaxonomy.PublicData); 48var dc6 = dc1.Union(FakeTaxonomy.PrivateData);
Microsoft.Extensions.Compliance.Redaction.Tests (9)
HmacRedactorExtensionsTests.cs (5)
17.AddRedaction(redaction => redaction.SetHmacRedactor(o => o.Key = HmacRedactorTest.HmacExamples[0].Key, FakeTaxonomy.PrivateData)) 33redaction.SetHmacRedactor(section, FakeTaxonomy.PrivateData); 49FakeTaxonomy.PublicData, 50FakeTaxonomy.PrivateData 61if (dc == FakeTaxonomy.PrivateData)
HmacRedactorTest.cs (4)
102}, FakeTaxonomy.PrivateData); 107var redactor = redactorProvider.GetRedactor(FakeTaxonomy.PrivateData); 127redaction.SetHmacRedactor(section, FakeTaxonomy.PrivateData); 132var redactor = redactorProvider.GetRedactor(FakeTaxonomy.PrivateData);
Microsoft.Extensions.Compliance.Testing (3)
FakeTaxonomy.cs (1)
16public static string TaxonomyName => typeof(FakeTaxonomy).FullName!;
PrivateDataAttribute.cs (1)
17: base(FakeTaxonomy.PrivateData)
PublicDataAttribute.cs (1)
17: base(FakeTaxonomy.PublicData)
Microsoft.Extensions.Compliance.Testing.Tests (2)
AttributeTests.cs (2)
17Assert.Equal(FakeTaxonomy.PrivateData, a.Classification); 20Assert.Equal(FakeTaxonomy.PublicData, a.Classification);
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (9)
Benchmarks\HeadersReaderBenchmark.cs (1)
44options.RequestHeadersDataClasses.Add($"Header{i}", FakeTaxonomy.PublicData);
HttpClientFactory.cs (8)
29options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData); 52options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData); 76options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData); 79options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData); 102options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData); 125options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData); 149options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData); 152options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.PrivateData);
Microsoft.Extensions.Http.Diagnostics.Tests (101)
HttpHeadersRedactorTests.cs (1)
21var actual = headersRedactor.Redact(input, FakeTaxonomy.PrivateData);
Logging\AcceptanceTests.cs (28)
139o.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.PrivateData); 140o.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.PrivateData); 141o.RequestHeadersDataClasses.Add("RequestHeaderFirst", FakeTaxonomy.PrivateData); 149o.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.PrivateData); 150o.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.PrivateData); 151o.RequestHeadersDataClasses.Add("RequestHeaderSecond", FakeTaxonomy.PrivateData); 218x.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.PrivateData); 219x.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.PrivateData); 220x.RequestHeadersDataClasses.Add("RequestHeader2", FakeTaxonomy.PrivateData); 229x.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.PrivateData); 230x.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.PrivateData); 231x.RequestHeadersDataClasses.Add("RequestHeader2", FakeTaxonomy.PrivateData); 301o.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 347o.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 412o.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 453options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } }; 460options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } }; 489options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } }; 496options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } }; 523options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } }; 529options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } }; 535options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test3", FakeTaxonomy.PrivateData } }; 541options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test4", FakeTaxonomy.PrivateData } }; 547options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test5", FakeTaxonomy.PrivateData } }; 552options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test6", FakeTaxonomy.PrivateData } }; 665x.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.PrivateData); 666x.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.PrivateData); 667x.RequestHeadersDataClasses.Add("RequestHeader2", FakeTaxonomy.PrivateData);
Logging\HttpClientLoggerTest.cs (14)
204ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData }, { "Header3", FakeTaxonomy.PrivateData } }, 205RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData }, { "Header3", FakeTaxonomy.PrivateData } }, 296ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 297RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 403ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 404RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 499ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 500RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 613ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 614RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 883ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 884RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } },
Logging\HttpClientLoggingExtensionsTest.cs (15)
132.AddExtendedHttpClientLogging(o => o.RequestHeadersDataClasses.Add("test1", FakeTaxonomy.PrivateData)) 135.AddExtendedHttpClientLogging(o => o.RequestHeadersDataClasses.Add("test2", FakeTaxonomy.PrivateData)) 142options.RequestHeadersDataClasses.Should().ContainValues(new List<DataClassification> { FakeTaxonomy.PrivateData }); 157var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.PrivateData); 171options.RequestHeadersDataClasses.Add(requestHeader, FakeTaxonomy.PrivateData); 172options.ResponseHeadersDataClasses.Add(responseHeader, FakeTaxonomy.PrivateData); 190options.RequestHeadersDataClasses.Should().Contain(requestHeader, FakeTaxonomy.PrivateData); 192options.ResponseHeadersDataClasses.Should().Contain(responseHeader, FakeTaxonomy.PrivateData); 266var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.PrivateData); 281options.RequestHeadersDataClasses.Add(requestHeader, FakeTaxonomy.PrivateData); 282options.ResponseHeadersDataClasses.Add(responseHeader, FakeTaxonomy.PrivateData); 300options.RequestHeadersDataClasses.Should().Contain(requestHeader, FakeTaxonomy.PrivateData); 302options.ResponseHeadersDataClasses.Should().Contain(responseHeader, FakeTaxonomy.PrivateData); 342x.RequestHeadersDataClasses.Add(ClientName, FakeTaxonomy.PublicData); 347x.RequestHeadersDataClasses.Add("default", FakeTaxonomy.PrivateData);
Logging\HttpHeadersReaderTest.cs (14)
45mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), FakeTaxonomy.PrivateData)) 47mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), FakeTaxonomy.PublicData)) 54{ "Header1", FakeTaxonomy.PrivateData }, 55{ "Header2", FakeTaxonomy.PrivateData } 59{ "Header3", FakeTaxonomy.PublicData }, 60{ "Header4", FakeTaxonomy.PublicData }, 61{ "hEaDeR7", FakeTaxonomy.PrivateData } // This one is to test case-insensitivity 109mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), FakeTaxonomy.PublicData)) 116{ "Header1", FakeTaxonomy.PublicData }, 117{ "Content-Header1", FakeTaxonomy.PublicData }, 118{ "Content-Type", FakeTaxonomy.PublicData } 122{ "Header3", FakeTaxonomy.PublicData }, 123{ "Content-Header2", FakeTaxonomy.PublicData }, 124{ "Content-Length", FakeTaxonomy.PublicData }
Logging\HttpRequestReaderTest.cs (21)
61RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } }, 62ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } }, 187RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 188ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 195opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 261RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 262ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 269opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 335RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 341opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 392RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 393ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 400opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 463RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 464ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 471opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData); 530RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 531ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 538opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.PrivateData);
Logging\LoggingOptionsTest.cs (8)
75{ "header 1", FakeTaxonomy.PrivateData }, 76{ "header 2", FakeTaxonomy.PrivateData } 89{ "header 1", FakeTaxonomy.PrivateData }, 90{ "header 2", FakeTaxonomy.PrivateData } 124{ "foo", FakeTaxonomy.PrivateData }, 125{ "bar", FakeTaxonomy.PrivateData }, 128_sut.RouteParameterDataClasses.Add("foo", FakeTaxonomy.PrivateData); 129_sut.RouteParameterDataClasses.Add("bar", FakeTaxonomy.PrivateData);
Microsoft.Extensions.Telemetry.Abstractions.Tests (9)
Logging\LoggerMessageStateTests.cs (9)
43lms.ClassifiedTagArray[index] = new(PropName, Value, new(FakeTaxonomy.PrivateData, FakeTaxonomy.PublicData)); 51Assert.Equal(new(FakeTaxonomy.PrivateData, FakeTaxonomy.PublicData), lms.ClassifiedTagArray[0].Classifications); 100collector.Add(PropName, Value, FakeTaxonomy.PrivateData); 108Assert.Equal(FakeTaxonomy.PrivateData, lms.ClassifiedTagArray[0].Classifications); 118collector.Add(PropName, Value, FakeTaxonomy.PrivateData); 126Assert.Equal(FakeTaxonomy.PrivateData, lms.ClassifiedTagArray[0].Classifications); 156lms.ClassifiedTagArray[index] = new(PropName, Value, FakeTaxonomy.PrivateData);
Microsoft.Extensions.Telemetry.Tests (39)
Http\HttpParserTests.cs (19)
21Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 38Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 57Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 77Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 123Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 155Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 198parametersToRedact.Add("routeId", FakeTaxonomy.PrivateData); 226Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 280Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } }; 325parametersToRedact.Add("controller", FakeTaxonomy.PrivateData); 326parametersToRedact.Add("action", FakeTaxonomy.PrivateData); 349{ "routeId", FakeTaxonomy.PrivateData }, 350{ "chatId", FakeTaxonomy.PrivateData }, 393{ "routeId", FakeTaxonomy.PrivateData }, 394{ "chatId", FakeTaxonomy.PrivateData }, 395{ "catchAll", FakeTaxonomy.PrivateData }, 439{ "routeId", FakeTaxonomy.PrivateData }, 440{ "chatId", FakeTaxonomy.PrivateData }, 441{ "catchAll", FakeTaxonomy.PrivateData },
Http\HttpRouteFormatterTests.cs (18)
95{ "userId", FakeTaxonomy.PrivateData }, 96{ "v1", FakeTaxonomy.PrivateData } 138{ "userId", FakeTaxonomy.PrivateData }, 139{ "routeId", FakeTaxonomy.PrivateData } 159{ "userId", FakeTaxonomy.PrivateData }, 160{ "routeId", FakeTaxonomy.PrivateData } 182parametersToRedact.Add("chatId", FakeTaxonomy.PrivateData); 241{ "userId", FakeTaxonomy.PrivateData }, 243{ "chatId", FakeTaxonomy.PrivateData }, 257Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 324Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 353Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 373Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } }; 401parametersToRedact.Add("controller", FakeTaxonomy.PrivateData); 402parametersToRedact.Add("action", FakeTaxonomy.PrivateData); 415Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 435Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 451Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
Logging\ExtendedLoggerTests.cs (2)
65lms.ClassifiedTagArray[index] = new("PK3", "PV3", FakeTaxonomy.PrivateData); 66lms.ClassifiedTagArray[index + 1] = new("PK4", null, FakeTaxonomy.PrivateData);