Skip to content

Improving DataProtection linkability #41411

@HaoK

Description

@HaoK

After 33ea420 this causes linkability warnings everywhere that uses data protection (cookies/identity)

The default

internal sealed class RegistryPolicyResolver : IRegistryPolicyResolver
supports arbitrary types.

But by default there are only two built in types that we need support would be:

Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=42.42.42.42

Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=42.42.42.42

The high level idea would be we just swap out the default implementation to a new implementation store that only supports these same two decryptors but is trimmable and can read the old format, and will throw an error telling them how to swap back to the old store if they use any other type. This would allow us to Apply the trimmable warning to whatever the API is new flag (maybe on DataProtectionOptions.EnableLegacyPolicyResolver?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: DesignThis issue requires design work before implementating.area-dataprotectionIncludes: DataProtectionbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.linker-friendlinessTracking linker friendliness

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions