Skip to content

Add the ability to delay the receipt of a certificate in the extension method DataProtectionBuilderExtensions.ProtectKeysWithCertificate #23033

Open
@shazhko-artem2

Description

@shazhko-artem2

Problem

In my current project, we have several certificate providers, so we use the certificate factory. Also, we use data protection and protect keys with a certificate. The problem is that DataProtectionBuilderExtensions.ProtectKeysWithCertificate requires a certificate directly, for which we need a certificate factory, but for getting a factory, we need an IServiceProvider.

Solution

We need to add a method overload with the following parameters.

public static IDataProtectionBuilder ProtectKeysWithCertificate(this IDataProtectionBuilder builder, Func<IServiceProvider, X509Certificate2 > factory){...}

Similar existing solutions

A similar solution already exists for AddKeyEscrowSink, but not for ProtectKeysWithCertificate.

public static IDataProtectionBuilder AddKeyEscrowSink(this IDataProtectionBuilder builder, Func<IServiceProvider, IKeyEscrowSink> factory){...}

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-mediumThis issue impacts approximately half of our customersarea-dataprotectionIncludes: DataProtectionenhancementThis issue represents an ask for new feature or an enhancement to an existing oneseverity-minorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions