187 references to PrivateData
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (30)
Logging\IncomingHttpRouteUtilityTests.cs (25)
60
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("userId"));
98
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("userId"));
100
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("teamId"));
138
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("userId"));
140
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("teamId"));
179
{ "testKey", FakeTaxonomy.
PrivateData
}
184
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("testKey"));
222
{ "testKey", FakeTaxonomy.
PrivateData
}
227
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("testKey"));
308
{ "testKey", FakeTaxonomy.
PrivateData
},
309
{ "teamId", FakeTaxonomy.
PrivateData
}
316
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("userId"));
318
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("teamId"));
320
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("testKey"));
363
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("userId"));
365
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("teamId"));
405
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("userId"));
407
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("teamId"));
409
d.Add("testKey", FakeTaxonomy.
PrivateData
);
414
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("userId"));
416
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("teamId"));
440
{ "testKey", FakeTaxonomy.
PrivateData
}
445
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("testKey"));
462
{ "testKey", FakeTaxonomy.
PrivateData
}
467
Assert.Equal(FakeTaxonomy.
PrivateData
, sensitiveParameters.GetValueOrDefault("testKey"));
Logging\RequestHeadersEnricherTests.cs (5)
84
{ HeaderKey1, FakeTaxonomy.
PrivateData
},
92
redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.
PrivateData
))
117
{ HeaderKey1, FakeTaxonomy.
PrivateData
},
123
redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.
PrivateData
))
274
redactorProviderMock.Setup(x => x.GetRedactor(FakeTaxonomy.
PrivateData
))
Microsoft.Extensions.Compliance.Abstractions.Tests (2)
Classification\DataClassificationSetTests.cs (2)
26
var dc6 = dc1.Union(FakeTaxonomy.
PrivateData
);
48
var dc6 = dc1.Union(FakeTaxonomy.
PrivateData
);
Microsoft.Extensions.Compliance.Redaction.Tests (8)
HmacRedactorExtensionsTests.cs (4)
17
.AddRedaction(redaction => redaction.SetHmacRedactor(o => o.Key = HmacRedactorTest.HmacExamples[0].Key, FakeTaxonomy.
PrivateData
))
33
redaction.SetHmacRedactor(section, FakeTaxonomy.
PrivateData
);
50
FakeTaxonomy.
PrivateData
61
if (dc == FakeTaxonomy.
PrivateData
)
HmacRedactorTest.cs (4)
102
}, FakeTaxonomy.
PrivateData
);
107
var redactor = redactorProvider.GetRedactor(FakeTaxonomy.
PrivateData
);
127
redaction.SetHmacRedactor(section, FakeTaxonomy.
PrivateData
);
132
var redactor = redactorProvider.GetRedactor(FakeTaxonomy.
PrivateData
);
Microsoft.Extensions.Compliance.Testing (2)
FakeTaxonomy.cs (1)
21
public static DataClassification PrivateData => new(TaxonomyName, nameof(
PrivateData
));
PrivateDataAttribute.cs (1)
17
: base(FakeTaxonomy.
PrivateData
)
Microsoft.Extensions.Compliance.Testing.Tests (1)
AttributeTests.cs (1)
17
Assert.Equal(FakeTaxonomy.
PrivateData
, a.Classification);
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (8)
HttpClientFactory.cs (8)
29
options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
52
options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
76
options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
79
options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
102
options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
125
options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
149
options.RequestHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
152
options.ResponseHeadersDataClasses.Add("Content-Type", FakeTaxonomy.
PrivateData
);
Microsoft.Extensions.Http.Diagnostics.Tests (90)
HttpHeadersRedactorTests.cs (1)
21
var actual = headersRedactor.Redact(input, FakeTaxonomy.
PrivateData
);
Logging\AcceptanceTests.cs (28)
139
o.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.
PrivateData
);
140
o.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.
PrivateData
);
141
o.RequestHeadersDataClasses.Add("RequestHeaderFirst", FakeTaxonomy.
PrivateData
);
149
o.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.
PrivateData
);
150
o.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.
PrivateData
);
151
o.RequestHeadersDataClasses.Add("RequestHeaderSecond", FakeTaxonomy.
PrivateData
);
218
x.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.
PrivateData
);
219
x.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.
PrivateData
);
220
x.RequestHeadersDataClasses.Add("RequestHeader2", FakeTaxonomy.
PrivateData
);
229
x.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.
PrivateData
);
230
x.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.
PrivateData
);
231
x.RequestHeadersDataClasses.Add("RequestHeader2", FakeTaxonomy.
PrivateData
);
301
o.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
347
o.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
412
o.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
453
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.
PrivateData
} };
460
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.
PrivateData
} };
489
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.
PrivateData
} };
496
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.
PrivateData
} };
523
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.
PrivateData
} };
529
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.
PrivateData
} };
535
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test3", FakeTaxonomy.
PrivateData
} };
541
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test4", FakeTaxonomy.
PrivateData
} };
547
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test5", FakeTaxonomy.
PrivateData
} };
552
options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test6", FakeTaxonomy.
PrivateData
} };
665
x.ResponseHeadersDataClasses.Add("ResponseHeader", FakeTaxonomy.
PrivateData
);
666
x.RequestHeadersDataClasses.Add("RequestHeader", FakeTaxonomy.
PrivateData
);
667
x.RequestHeadersDataClasses.Add("RequestHeader2", FakeTaxonomy.
PrivateData
);
Logging\HttpClientLoggerTest.cs (14)
204
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.
PrivateData
}, { "Header3", FakeTaxonomy.
PrivateData
} },
205
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.
PrivateData
}, { "Header3", FakeTaxonomy.
PrivateData
} },
296
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.
PrivateData
} },
297
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.
PrivateData
} },
403
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.
PrivateData
} },
404
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.
PrivateData
} },
499
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.
PrivateData
} },
500
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.
PrivateData
} },
613
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.
PrivateData
} },
614
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.
PrivateData
} },
883
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.
PrivateData
} },
884
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.
PrivateData
} },
Logging\HttpClientLoggingExtensionsTest.cs (14)
132
.AddExtendedHttpClientLogging(o => o.RequestHeadersDataClasses.Add("test1", FakeTaxonomy.
PrivateData
))
135
.AddExtendedHttpClientLogging(o => o.RequestHeadersDataClasses.Add("test2", FakeTaxonomy.
PrivateData
))
142
options.RequestHeadersDataClasses.Should().ContainValues(new List<DataClassification> { FakeTaxonomy.
PrivateData
});
157
var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.
PrivateData
);
171
options.RequestHeadersDataClasses.Add(requestHeader, FakeTaxonomy.
PrivateData
);
172
options.ResponseHeadersDataClasses.Add(responseHeader, FakeTaxonomy.
PrivateData
);
190
options.RequestHeadersDataClasses.Should().Contain(requestHeader, FakeTaxonomy.
PrivateData
);
192
options.ResponseHeadersDataClasses.Should().Contain(responseHeader, FakeTaxonomy.
PrivateData
);
266
var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.
PrivateData
);
281
options.RequestHeadersDataClasses.Add(requestHeader, FakeTaxonomy.
PrivateData
);
282
options.ResponseHeadersDataClasses.Add(responseHeader, FakeTaxonomy.
PrivateData
);
300
options.RequestHeadersDataClasses.Should().Contain(requestHeader, FakeTaxonomy.
PrivateData
);
302
options.ResponseHeadersDataClasses.Should().Contain(responseHeader, FakeTaxonomy.
PrivateData
);
347
x.RequestHeadersDataClasses.Add("default", FakeTaxonomy.
PrivateData
);
Logging\HttpHeadersReaderTest.cs (4)
45
mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), FakeTaxonomy.
PrivateData
))
54
{ "Header1", FakeTaxonomy.
PrivateData
},
55
{ "Header2", FakeTaxonomy.
PrivateData
}
61
{ "hEaDeR7", FakeTaxonomy.
PrivateData
} // This one is to test case-insensitivity
Logging\HttpRequestReaderTest.cs (21)
61
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.
PrivateData
}, { header3.Key, FakeTaxonomy.
PrivateData
} },
62
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.
PrivateData
}, { header3.Key, FakeTaxonomy.
PrivateData
} },
187
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.
PrivateData
} },
188
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.
PrivateData
} },
195
opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
261
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.
PrivateData
} },
262
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.
PrivateData
} },
269
opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
335
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.
PrivateData
} },
341
opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
392
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.
PrivateData
} },
393
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.
PrivateData
} },
400
opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
463
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.
PrivateData
} },
464
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.
PrivateData
} },
471
opts.RouteParameterDataClasses.Add("userId", FakeTaxonomy.
PrivateData
);
530
RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.
PrivateData
} },
531
ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.
PrivateData
} },
538
opts.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 (7)
Logging\LoggerMessageStateTests.cs (7)
43
lms.ClassifiedTagArray[index] = new(PropName, Value, new(FakeTaxonomy.
PrivateData
, FakeTaxonomy.PublicData));
51
Assert.Equal(new(FakeTaxonomy.
PrivateData
, FakeTaxonomy.PublicData), lms.ClassifiedTagArray[0].Classifications);
100
collector.Add(PropName, Value, FakeTaxonomy.
PrivateData
);
108
Assert.Equal(FakeTaxonomy.
PrivateData
, lms.ClassifiedTagArray[0].Classifications);
118
collector.Add(PropName, Value, FakeTaxonomy.
PrivateData
);
126
Assert.Equal(FakeTaxonomy.
PrivateData
, lms.ClassifiedTagArray[0].Classifications);
156
lms.ClassifiedTagArray[index] = new(PropName, Value, FakeTaxonomy.
PrivateData
);
Microsoft.Extensions.Telemetry.Tests (39)
Http\HttpParserTests.cs (19)
21
Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.
PrivateData
} };
38
Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.
PrivateData
} };
57
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
77
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
123
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
155
Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.
PrivateData
} };
198
parametersToRedact.Add("routeId", FakeTaxonomy.
PrivateData
);
226
Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.
PrivateData
} };
280
Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.
PrivateData
} };
325
parametersToRedact.Add("controller", FakeTaxonomy.
PrivateData
);
326
parametersToRedact.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
}
182
parametersToRedact.Add("chatId", FakeTaxonomy.
PrivateData
);
241
{ "userId", FakeTaxonomy.
PrivateData
},
243
{ "chatId", FakeTaxonomy.
PrivateData
},
257
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
324
Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.
PrivateData
} };
353
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
373
Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.
PrivateData
} };
401
parametersToRedact.Add("controller", FakeTaxonomy.
PrivateData
);
402
parametersToRedact.Add("action", FakeTaxonomy.
PrivateData
);
415
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
435
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
451
Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.
PrivateData
} };
Logging\ExtendedLoggerTests.cs (2)
65
lms.ClassifiedTagArray[index] = new("PK3", "PV3", FakeTaxonomy.
PrivateData
);
66
lms.ClassifiedTagArray[index + 1] = new("PK4", null, FakeTaxonomy.
PrivateData
);