【发布时间】:2014-05-13 15:44:54
【问题描述】:
我在系统中有以下代码,我正在努力从 MSDN 文档中找出该方法是否将使用 Kerberos 或 NTLM 获取用户组列表。
private static List<SecurityIdentifier> GetUserGroupIds(string user, string groupType, PrincipalContext pc)
{
using (var identity = UserPrincipal.FindByIdentity(pc, IdentityType.SamAccountName, user))
{
if (identity == null)
{
return new List<SecurityIdentifier>();
}
var userEntry = identity.GetUnderlyingObject() as DirectoryEntry;
userEntry.RefreshCache(new[] { groupType });
return (from byte[] sid in userEntry.Properties[groupType]
select new SecurityIdentifier(sid, 0)).ToList();
}
}
关于我如何分辨的任何想法?我尝试使用 PerfMon 来捕获 NTLM 和 Kerberos 调用的跟踪,但由于机器上正在运行其他服务,因此很难判断。
【问题讨论】:
-
我认为网络监视器将是捕获身份验证跟踪的合适工具。特别是因为它已经有一个预定义的“身份验证流量”过滤器
标签: asp.net .net active-directory