gpt4 book ai didi

security - 如何保护 .ASPXAUTH token

转载 作者:行者123 更新时间:2023-12-04 02:08:03 26 4
gpt4 key购买 nike

您如何保护 .ASPXAUTH token 以便它通过 SSL 发送。

最佳答案

直接来自 msdn docs :

To prevent forms authentication cookies from being captured and tampered with while crossing the network, ensure that you use SSL with all pages that require authenticated access and restrict forms authentication tickets to SSL channels by setting requireSSL="true" on the <forms> element.

To restrict forms authentication cookies to SSL channels set requireSSL="true" on the <forms> element, as shown in the following code:

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

By setting requireSSL="true", you set the secure cookie property that determines whether browsers should send the cookie back to the server. With the secure property set, the cookie is sent by the browser only to a secure page that is requested using an HTTPS URL.



注:使用 requireSSL="true" 时,仅针对通过 SSL 请求的页面发送 auth cookie。因此,如果您通过 HTTP(非 SSL)访问某个页面,您可能似乎没有登录。本文讨论了该问题并提出了一个与 SharePoint 站点相关的解决方案(但该理论是可转移的): Securing the authentication cookie for mixed SSL SharePoint sites

关于security - 如何保护 .ASPXAUTH token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10981061/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com