确保ASP.NET表单上客户端身份验证令牌? [英] securing ASP.NET forms authentication token on client side?

查看:105
本文介绍了确保ASP.NET表单上客户端身份验证令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站,我没有使用任何认证或授权。我创建登录页面来捕获用户凭据并核对数据库。如果用户成功验证,它存储用户数据会话,并导航到其他页面。

如何实现窗体身份验证的想法,但我关心的是如何确保在客户端浏览器的认证令牌出于安全原因。没有人有任何想法如何确保认证令牌?


解决方案

会话:结果
快速,可扩展和安全会话状态管理为Web应用程序

验证:结果
如何:保护窗体身份验证在ASP.NET 2.0中

  步骤1.配置


  

确保您的窗体身份验证
  门票被加密和完整性
  通过设置保护=全部检查
  的元素。这是在
  默认设置,你可以查看此
  在Machine.config.comments文件。


 <形成保护=所有... />

  第2步:使用SHA1 HMAC用于发电和AES加密

 <的machineKey
   的validationKey =自动生成,IsolateApps
   decryptionKey =自动生成,IsolateApps
   解密=自动
   验证=SHA1/>

  第3步:保护身份验证票证使用SSL

 <形式loginUrl =安全\\的Login.aspx
       requireSSL =真正的... />

In my website, I am not using any authentication or authorization. I've created login page to capture the user credentials and check against database. If the user successfully authenticates, it's storing the user data in session and navigating to other pages.

How thinking of implementing Forms Authentication, but my concern is how to secure the authentication token in client browser for security reasons. Does anyone have any ideas how to secure the authentication token?

解决方案

Session:
Fast, Scalable, and Secure Session State Management for Your Web Applications

Authentication:
How To: Protect Forms Authentication in ASP.NET 2.0

 Step 1. Configure

Ensure that your forms authentication tickets are encrypted and integrity checked by setting protection="All" on the element. This is the default setting and you can view this in the Machine.config.comments file.

<forms protection="All" ... />

 Step 2. Use SHA1 for HMAC Generation and AES for Encryption

<machineKey 
   validationKey="AutoGenerate,IsolateApps"
   decryptionKey="AutoGenerate,IsolateApps"
   decryption="Auto" 
   validation="SHA1" />

 Step 3. Protect Authentication Tickets with SSL

<forms loginUrl="Secure\Login.aspx"
       requireSSL="true" ... />

这篇关于确保ASP.NET表单上客户端身份验证令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆