Tag: active directory

在Linux上使用Java对Active Directory进行身份validation

我有一个使用Java对Active Directory进行身份validation的简单任务。 只是validation凭证,没有别的。 假设我的域是“fun.xyz.tld”,OUpath是未知的,并且用户名/密码是testu / testp。 我知道有几个Java库可以简化这个任务,但是我没有成功实现它们。 我发现的大多数示例都是针对LDAP,而不是专门针对Active Directory。 发出LDAP请求意味着发送一个OUpath,我没有。 此外,发出LDAP请求的应用程序应该已经绑定到Active Directory以访问它…不安全,因为凭据将不得不被存储在某个地方可发现。 如果可能的话,我想用testing凭证进行testing绑定 – 这意味着该帐户是有效的。 最后,如果可能的话,有没有办法使这样的authentication机制encryption? 我知道AD使用Kerberos,但不确定Java的LDAP方法。 有没有人有一个工作代码的例子? 谢谢。

使用Active Directory的.NET中的用户组和angular色pipe理

我目前正在研究存储基于.NET的项目的用户angular色和权限的方法。 其中一些项目是基于networking的,有些则不是。 我目前正在努力寻找最好的方法来实现我所期望的跨项目types的一致,可移植的方式。 我在哪里,我们正在考虑利用Active Directory作为我们的基本用户信息的单一联系点。 正因为如此,我们希望不必为每个应用程序的用户维护一个自定义数据库,因为它们已经存储在Active Directory中并在那里进行了主动维护。 另外,如果可能,我们不想编写自己的安全模型/代码,并且想要使用预先存在的东西,比如Microsoft提供的安全应用程序块。 有些项目只需要基本的权限,例如读取,写入或不访问。 其他项目需要更复杂的权限。 这些应用程序的用户可能被授予对某些区域的访问权限,但不允许其他用户访问这些应用程序,并且他们的权限可能会在每个区域发生变化 应用程序的pipe理部分将控制和定义此访问, 而不是 AD工具。 目前,我们正在使用集成的Windows身份validation在我们的Intranet上执行身份validation。 这很适合查找基本的用户信息,而且我已经看到ASP.NET可以扩展为提供Active Directoryangular色提供程序,所以我可以找出用户所属的任何安全组。 但是,对我来说,这种方法的垮台似乎是一切都存储在活动目录中,如果事情变得太大,可能会导致混乱。 沿着同样的路线,我也听说过Active Directory轻量级目录服务,它似乎可以扩展我们的模式并只添加特定于应用程序的属性和组。 问题是,我无法find任何这方面的工作或如何工作。 有MSDN的文章,描述如何与这个实例交谈,以及如何创build一个新的实例,但似乎没有任何回答我的问题。 我的问题是:根据你的经验,我正走在正确的轨道上吗? 是我正在寻找可能使用Active Directory,或其他工具必须使用? 我看过的其他方法: 使用多个web.config文件[ stackoverflow ] 创build自定义安全模型和数据库以跨应用程序pipe理用户

活动目录COMexception – 发生操作错误(0x80072020)

我得到一个间歇性COMexception“ 操作错误发生(0x80072020) ”(如下所示)当我尝试使用方法GroupPrincipal.FindByIdentity查询Active Directory 这是我的代码: PrincipalContext ctx = new PrincipalContext(ContextType.Domain, Environment.UserDomainName); GroupPrincipal groupPrincipal = GroupPrincipal.FindByIdentity(ctx, IdentityType.Name, "Group to find"); 我收到exception: Inner Exception: System.Runtime.InteropServices.COMException (0x80072020): An operations error occurred. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer() at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit() at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize() at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx() at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext […]

如何获取Active Directory中的用户组? (c#,asp.net)

我使用此代码来获取当前用户的组。 但我想手动给用户,然后得到他的团体。 我该怎么做? using System.Security.Principal; public ArrayList Groups() { ArrayList groups = new ArrayList(); foreach (IdentityReference group in System.Web.HttpContext.Current.Request.LogonUserIdentity.Groups) { groups.Add(group.Translate(typeof(NTAccount)).ToString()); } return groups; }

我可以在ASP.NET中从DirectorySearcher获得1000多条logging吗?

我刚刚注意到结果的返回列表限制为1000.我的域(HUGE域)中有1000多个组。 我怎样才能获得超过1000条logging? 我可以从稍后的logging开始吗? 我可以把它分成多个search吗? 这是我的查询: DirectoryEntry dirEnt = new DirectoryEntry("LDAP://dhuba1kwtn004"); string[] loadProps = new string[] { "cn", "samaccountname", "name", "distinguishedname" }; DirectorySearcher srch = new DirectorySearcher(dirEnt, "(objectClass=Group)", loadProps); var results = srch.FindAll(); 我试图设置srch.SizeLimit = 2000; ,但似乎并不奏效。 有任何想法吗?

我如何从活动目录获取用户列表?

我如何从活动目录获取用户列表? 有没有办法拉用户名,名字,姓? 我看到一个类似的post,在这里使用: PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "YOURDOMAIN"); 我从来没有做过任何活动目录,所以我完全失去了。 任何帮助将不胜感激!