You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deleting a key is truly destructive behavior, and consequently the data protection system exposes no first-class API for performing this operation.
Is the expired key still being used to unprotect data previously protected by that key even that key is expired?
Are the expired key kept forever even it might not have any more data protected by it?
I need to write a custom IXmlRepository to store the keys in the Couchbase. I read the RedisXmlRepository codes, the StoreElement just appends the new element to the existing key value and the GetAllElementsCore returns the array of values of that key.
For Couchbase, I can do the similar to create one document and append sub-document to it. However, Couchbase has a 20MB size limit for each document. Although the size of the key XML is not large, it may reach that limit one day if the key is never deleted.
Is it a bad practice to delete the key even it is not needed to unprotect any data? I think currently we need it for the cookie authentication only. The worse case of deleting the key is the user may need to relogon. What else from ASP.NET Core need the data protection by default?
The text was updated successfully, but these errors were encountered:
@blowdart Thanks for answering my questions. It is just that ASP.NET Core does not know when the key is not used so it won't delete it. For us the developer who knows how our applications work, we need to decide when the key should be deleted or if it can be deleted.
I can set KeyManagementOptions.NewKeyLifetime and set the Couchbase TTL at certain time after the key expired to delete it.
I post the question on stackoverflow but I don't get any answer. I post here to see if someone can answer me.
According to ASP.NET Key Management,:
Is the expired key still being used to unprotect data previously protected by that key even that key is expired?
Are the expired key kept forever even it might not have any more data protected by it?
I need to write a custom IXmlRepository to store the keys in the Couchbase. I read the RedisXmlRepository codes, the StoreElement just appends the new element to the existing key value and the GetAllElementsCore returns the array of values of that key.
For Couchbase, I can do the similar to create one document and append sub-document to it. However, Couchbase has a 20MB size limit for each document. Although the size of the key XML is not large, it may reach that limit one day if the key is never deleted.
Is it a bad practice to delete the key even it is not needed to unprotect any data? I think currently we need it for the cookie authentication only. The worse case of deleting the key is the user may need to relogon. What else from ASP.NET Core need the data protection by default?
The text was updated successfully, but these errors were encountered: