【发布时间】:2015-02-04 14:55:53
【问题描述】:
我在服务和客户端之间使用 WCF(Windows 服务自主机)netTCP。这就是自定义绑定的样子
<binding name="netTcpWindowMessageSecurity" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="infinite" sendTimeout="01:00:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="1000" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="200" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="infinite" enabled="false" />
<security mode="Message">
<message clientCredentialType="Windows" />
</security>
</binding>
我真正做的唯一一件事就是将当前(登录)Windows 用户(在客户端)映射到我服务中的用户。
我知道服务和客户端之间的通信将被加密但是会使用 Kerberos 吗?我怎么知道?是什么决定了它是否被使用?
编辑:
我可以在我的 Evenlog > 安全中看到这一点
Logon Type: 5
Impersonation Level: Impersonation
New Logon:
Security ID: SYSTEM
Account Name: SYSTEM
Account Domain: NT AUTHORITY
Logon ID: 0x3E7
Logon GUID: {00000000-0000-0000-0000-000000000000}
Process Information:
Process ID: 0x310
Process Name: C:\Windows\System32\services.exe
Network Information:
Workstation Name:
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: Advapi
Authentication Package: Negotiate
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
【问题讨论】:
-
首先,inactivityTimeout="infinite" 不会像您认为的那样做。其次,不,您的数据没有被加密,我不确定您为什么这么认为。第三,根本不涉及 Kerberos,正如您的安全日志显示的那样,它使用的是 NTLM(Lan Manager)身份验证。
-
@ErikFunkenbusch 从我读到的 inactivityTimout 中,连接货车在被丢弃之前处于非活动状态的时间有多长?但是我确实有一个keepAlive。据我所知,安全性在传输层打开,将使用的凭据是 Windows。从我读到的这意味着数据将被加密?你能指出我在哪里解释了你所建议的方式吗?
-
@ErikFunkenbusch 因为没有任何信息表明使用了 NTLM,有一个包名称,但它仅说明 NTLM 并且没有信息?
-
我无法为您指出不存在的东西。安全性与身份验证有关,与您的数据加密无关。我不能指出你说这不是不合逻辑的假设,因为没有人会写这样的文档。相反,您有哪些文件表明这会加密您的数据?不,inactivityTimeout 比你想象的要复杂得多……见stackoverflow.com/questions/26732515/keepalive-with-wcf-and-tcp/…
-
对不起,你是对的,我怎么会忘记那个答案!正要删除 ping 功能,但一直没来得及。
标签: c# .net wcf active-directory kerberos