dotnet / dotnet/aspnetcore

AspNetCore.DataProtection `ProtectKeysWithCertificate` rotation mechanism

Open
#40,145 7 comments 4 reactions 0 assignees View on GitHub
area-dataprotection Docs net8_docathon
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

Protecting keys at rest is a good practice and is often done via the `ProtectKeysWith...` methods like `ProtectKeysWithCertificate`.
However, protecting the keys with for example `ProtectKeysWithCertificate` and an `X509Certificate2` keeps the problem of rotating the certificate used for protecting the keys at rest. Is there a good pattern or some documentation on this topic on how to proceed with rotation certificates used for key protection at rest without restarting the application?

### Describe the solution you'd like

Some docs or a API to configure propper certificate rotation for the protection of key in rest.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.