-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityaffected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-dataprotectionIncludes: DataProtectionIncludes: DataProtectionbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.severity-minorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
Describe the bug
I use
services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(filesharePath);
to generate data-protection keys. This produces the issue on initial application startup and possibly the same may happen during rotation of data-protection key. What essentially happens is:
- 2 or more instances of app on startup detect that there is no data-protection key in the fileshare
- 2 or more instances generate the key thus the pods have different data-protection keys for next 24 hours unless I force pods to restart. This causes for example issues with antiforgery tokens not being accepted by instances running on other pods.
The same may probably happen when the existing data-protection key is near expiration time and 2 instances running on separate pods decide do generate the new data-protection key.
Is it possible to do something about it?
To Reproduce
Use
services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(filesharePath);
and deploy your ASP.NET Core app two few pods.
Exceptions (if any)
Further technical details
- ASP.NET Core version 3.1
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityaffected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-dataprotectionIncludes: DataProtectionIncludes: DataProtectionbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.severity-minorThis label is used by an internal toolThis label is used by an internal tool