NWebSec.SessionSecurity authenticationKey属性的规则是什么?

时间:2015-12-17 22:58:24

标签: nwebsec

具体而言,如下所示:

  <nwebsec>
    <sessionSecurity xmlns="http://nwebsec.com/SessionSecurityConfig.xsd"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:noNamespaceSchemaLocation="NWebsecConfig/SessionSecurityConfig.xsd">
      <sessionIDAuthentication enabled="true"
                               useMachineKey="false"
 ----------------------->      authenticationKey="64char hex string here"/>
    </sessionSecurity>
  </nwebsec>

我的问题是:

  • 我应该在网站的不同部署之间更改此值吗?
  • 这应该是个秘密吗? (我假设如此,但没有说明。)

1 个答案:

答案 0 :(得分:1)

authenticationKey是使用machineKey的替代方法,应该同样对待。即你应该为不同的环境使用不同的密钥,你也应该保密密钥。

如果您为自己的应用配置了machineKey,建议您使用它。已添加authenticationKey以支持无法从配置中读取machineKey的情况。