Skip to content

Remove unused DataProtection configuration from Sidecar - #3776

Merged
Bogdan Gavril (bgavrilMS) merged 3 commits into
masterfrom
copilot/fix-dataprotect-in-sidecar
Apr 20, 2026
Merged

Remove unused DataProtection configuration from Sidecar#3776
Bogdan Gavril (bgavrilMS) merged 3 commits into
masterfrom
copilot/fix-dataprotect-in-sidecar

Conversation

Copilot AI commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

The Sidecar uses in-memory token caching (AddInMemoryTokenCaches), so the ConfigureDataProtection method 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: Remove ConfigureDataProtection method and its call site; drop unused using directives for System.Security.Cryptography.X509Certificates and Microsoft.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-deleted DATA_PROTECTION_KEYS_PATH, DATA_PROTECTION_CERT_PATH, and DATA_PROTECTION_CERT_PASSWORD environment variables.

Copilot AI linked an issue Apr 15, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix DataProtection in SideCar to use encryption Remove unused DataProtection configuration from Sidecar Apr 15, 2026
@bgavrilMS
Bogdan Gavril (bgavrilMS) marked this pull request as ready for review April 15, 2026 21:01
@bgavrilMS
Bogdan Gavril (bgavrilMS) requested a review from a team as a code owner April 15, 2026 21:01
@bgavrilMS
Bogdan Gavril (bgavrilMS) force-pushed the copilot/fix-dataprotect-in-sidecar branch from 9385ec1 to 2dc9f60 Compare April 15, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataProtection in SideCar is not used

3 participants