从使用 SMO 的 ASP.NET 应用程序使用 SQL Server 时,保留登录名和密码的最佳方法是什么?

发布于 2024-09-29 03:24:28 字数 125 浏览 0 评论 0原文

我正在使用 SMO 创建一个简单的 Web 管理工作室。使用 ASP.NET 机制(例如表单验证、cookie 等)持久/存储用户信息(数据库的登录名和密码)是否足够安全。

这样做的最佳实践是什么?

谢谢

I am creating a simple web management studio using SMO. Is it secure enough to persist/store user information (login and password for database) using ASP.NET mechanism (e.g. formsauthentication, cookies, etc.).

What will be the best practice to do this?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沉鱼一梦 2024-10-06 03:24:28

是的,它非常安全,但您必须考虑这一点:

  • User requireSSL = true
  • cookieless = false
  • enableCrossAppRedirects=false
  • httpOnlyCookies="true"

也适用于角色管理器 不要在 cookie 中缓存角色

<roleManager enabled="true" cacheRolesInCookie="false">

非“开箱即用”系统是 100% 什么您正在寻找,并且您可能需要考虑需要采取哪些其他额外措施才能使其更加安全。

您还可以打开数据库,查看其中存储了哪些信息,看看是否满足您的要求。密码不被保存,而是它的盐,所以你无法读取它,它保存的是你的用户的电子邮件/名称。

一些额外的参考

http://msdn.microsoft.com/en-us/library/ ff650037.aspx

http://weblogs.asp.net/scottgu/archive/2006/02/24/ASP.NET-2.0-Membership_2C00_-Roles_2C00_-Forms-Authentication_2C00_-and-Security-Resources -.aspx

http://msdn.microsoft.com/en- us/library/ms972969.aspx

http://msdn.microsoft.com。 com/en-us/magazine/cc163807.aspx

Yes it is very secure but you must consider this:

  • User requireSSL = true
  • cookieless = false
  • enableCrossAppRedirects=false
  • httpOnlyCookies="true"

also for the role manager do not cache the roles in cookie

<roleManager enabled="true" cacheRolesInCookie="false">

non "out of the box" system is 100% what you looking for, and you maybe need to think what other extra messure you need to take for make it even more secure.

Also you can open the database and see what informtions is stored on it, to see if are meet your requirements. The password is not saved, but the salt of it, so you can not read it, and it save is the email/name of your user.

Some extra reference

http://msdn.microsoft.com/en-us/library/ff650037.aspx

http://weblogs.asp.net/scottgu/archive/2006/02/24/ASP.NET-2.0-Membership_2C00_-Roles_2C00_-Forms-Authentication_2C00_-and-Security-Resources-.aspx

http://msdn.microsoft.com/en-us/library/ms972969.aspx

http://msdn.microsoft.com/en-us/magazine/cc163807.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文