dotnet / dotnet/aspnetcore

Allow option for DataProtection keys to not be cached

Open
#43,500 13 comments 4 reactions 0 assignees View on GitHub
area-dataprotection enhancement
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

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.

I have a multi-tenant application where I would like for each tenant to have their own data protection keys which are saved in a DB. I find that there is no way to do this (without writing my own DataProtectionProvider) since the keys are always cached. Even if I were to write my own XML Repository, I am unable to use it on a per-request basis as the keys are already valid for a period of 24 hours.

### Describe the solution you'd like

Provide an option to not cache keys so that it may be possible for developers to use their own cache and resolve keys on a per request basis.

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.