• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
PowerCoder
博客园    首页    新随笔    联系   管理    订阅  订阅

Data Protection - how to manage expired key?(转载)

问


According to ASP.NET Key Management:

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?


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?

 

 

答


Is the expired key still being used to unprotect data previously protected by that key even that key is expired?
Yes.


Are the expired key kept forever even it might not have any more data protected by it?
Yes, because we have no way of knowing how you used it, or whether any data still exists.


Is it a bad practice to delete the key even it is not needed to unprotect any data?
Probably not, but you as the developer can use data protection for your own data. We can't know whether you did or not.


What else from ASP.NET Core need the data protection by default?
Parts of OAuth login flow, session and temp data. But those are really short lived.

 

 

原文链接

 

posted @ 2019-02-02 10:37  PowerCoder  阅读(599)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3