Apply Sanitizers Immediately #3265
Labels
Central-EngSys
This issue is owned by the Engineering System team.
Test-Proxy
Anything relating to test-proxy requests or issues.
@timovv was investigating Azure/azure-sdk-for-js#18222
Essentially,
sanitizers
apply duringrecord
when we stop the recording. During playback, sanitizers are applied to each request prior to matching against the recordings.There are complicating factors here. We have sanitizers that rely on more than just an individual request/response pair. See
ContinuationSanitizer
. We should properly apply those sanitizers that do operate on individual entries during the recording, then apply all session-level sanitizers when saving to disk.This makes sense because to not apply individual sanitizers to each request means that if a sanitizer is added while a recording is in progress than it should only apply to the requests after it was added. Example Timeline below
Admin/AddSanitizer
to add sanitizer ARecord/Start
-> returns recordingidRecord Request 1
Admin/AddSanitizer
to add sanitizer BRecord Request 2
Request 1 should be sanitized by
A
only. Request 2 should be sanitized byA
ANDB
.With the way the proxy currently works,
A
andB
will apply to both regardless.The text was updated successfully, but these errors were encountered: