-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redact PII from request URLs in logs (#1406)
- Loading branch information
Showing
29 changed files
with
273 additions
and
286 deletions.
There are no files selected for viewing
53 changes: 0 additions & 53 deletions
53
TeachingRecordSystem/src/TeachingRecordSystem.Api/HttpRequestExtensions.cs
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
...chingRecordSystem.Api/Infrastructure/ApplicationInsights/RedactedUrlTelemetryProcessor.cs
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
...rdSystem/src/TeachingRecordSystem.Api/Infrastructure/Logging/RedactQueryParamAttribute.cs
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
...RecordSystem/src/TeachingRecordSystem.Api/Infrastructure/Logging/RedactedUrlParameters.cs
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
...rc/TeachingRecordSystem.Api/Infrastructure/Logging/RemoveRedactedUrlParametersEnricher.cs
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
...chingRecordSystem.Api/Infrastructure/Logging/RemoveRedactedUrlParametersEventProcessor.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
...ingRecordSystem.AuthorizeAccess/Infrastructure/Logging/WebApplicationBuilderExtensions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/appsettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ystem.ServiceDefaults/Infrastructure/ApplicationInsights/RedactedUrlTelemetryProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Microsoft.ApplicationInsights.Channel; | ||
using Microsoft.ApplicationInsights.DataContracts; | ||
using Microsoft.ApplicationInsights.Extensibility; | ||
using TeachingRecordSystem.ServiceDefaults.Infrastructure.Logging; | ||
|
||
namespace TeachingRecordSystem.ServiceDefaults.Infrastructure.ApplicationInsights; | ||
|
||
public class RedactedUrlTelemetryProcessor(ITelemetryProcessor next, UrlRedactor urlRedactor) : ITelemetryProcessor | ||
{ | ||
public void Process(ITelemetry item) | ||
{ | ||
if (item is RequestTelemetry requestTelemetry) | ||
{ | ||
requestTelemetry.Url = new Uri(urlRedactor.GetScrubbedRequestUrl()); | ||
} | ||
|
||
next.Process(item); | ||
} | ||
} |
Oops, something went wrong.