[BUG] Upgrading from Microsoft.AspNetCore.DataProtection unable to load existing keys #14761
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Extensions
ASP.NET Core extensions
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
Milestone
Query/Question
Based on this breaking change I'm working through upgrading to newer Azure.Extensions.* components to be used for DataProtection.
We were previously using the following pacakges
And we're now testing with
I worked through the differences in the APIs and have the data protection registration successfully working with this service registration code
In a new environment where there are no pre-existing keys in a key ring, it's working as expected.
The problem is that when I roll this code out to an environment with an existing key ring, it's unable to read existing keys.
At first, the exception was
Which makes sense given that I had removed the reference to the old Microsoft.AspNetCore.DataProtection.* packages. My first thought was to add those references back in again so the internals could read the existing keys and we could run for a period of time until new keys were rolled with the new Azure.Extensions.AspNetCore.DataProtection.* packages. After I made that change, I started getting this exception though.
In the key ring XML, the following XML node is the culprit
If I manually update the decryptorType attribute on existing keys to the newer decryption class, it's able to read existing keys.
I'm wondering if
Thank you
The text was updated successfully, but these errors were encountered: