Remove unused DataProtection configuration from Sidecar - #3776
Merged
Bogdan Gavril (bgavrilMS) merged 3 commits intoApr 20, 2026
Conversation
Copilot
AI
changed the title
[WIP] Fix DataProtection in SideCar to use encryption
Remove unused DataProtection configuration from Sidecar
Apr 15, 2026
Bogdan Gavril (bgavrilMS)
approved these changes
Apr 15, 2026
Bogdan Gavril (bgavrilMS)
marked this pull request as ready for review
April 15, 2026 21:01
Agent-Logs-Url: https://github.com/AzureAD/microsoft-identity-web/sessions/bf35223d-645a-489b-9d64-3769b4a891af Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
Bogdan Gavril (bgavrilMS)
force-pushed
the
copilot/fix-dataprotect-in-sidecar
branch
from
April 15, 2026 21:01
9385ec1 to
2dc9f60
Compare
Bogdan Gavril (bgavrilMS)
requested review from
Ievgen Polyvanyi (cpp11nullptr) and
Gladwin Johnson VR (gladjohn)
April 17, 2026 10:39
Gladwin Johnson VR (gladjohn)
approved these changes
Apr 17, 2026
Bogdan Gavril (bgavrilMS)
deleted the
copilot/fix-dataprotect-in-sidecar
branch
April 20, 2026 10:51
This was referenced Apr 20, 2026
This was referenced Jun 29, 2026
Closed
Closed
This was referenced Jul 13, 2026
Closed
Closed
This was referenced Jul 27, 2026
Closed
Closed
This was referenced Aug 3, 2026
Closed
This was referenced Aug 12, 2026
This was referenced Aug 19, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Sidecar uses in-memory token caching (
AddInMemoryTokenCaches), so theConfigureDataProtectionmethod was never actually protecting tokens at rest. Beyond being dead code, it introduced compliance concerns: keys were persisted to disk in plaintext by default, and the optional certificate-based encryption had no rotation mechanism.Changes
Program.cs: RemoveConfigureDataProtectionmethod and its call site; drop unusedusingdirectives forSystem.Security.Cryptography.X509CertificatesandMicrosoft.AspNetCore.DataProtection. The Sidecar now relies on ASP.NET Core's default ephemeral in-memory data protection.README.md: Remove the Data protection configuration entry documenting the now-deletedDATA_PROTECTION_KEYS_PATH,DATA_PROTECTION_CERT_PATH, andDATA_PROTECTION_CERT_PASSWORDenvironment variables.