Netwrix 1Secure 提供跨数据和身份的统一可见性——免费试用14天,享有完全访问权限。开始免费试用

资源中心博客

Active Directory 信任(Trust)

Active Directory 信任(Trust)

Feb 17, 2023

自从该技术在 Windows 2000 Server 中引入以来,IT 管理员一直在使用并围绕 Active Directory 开展工作。Windows 2000 Server 于 2000 年 2 月 17 日发布,但许多管理员在 Active Directory 于 1999 年 12 月 15 日发布至量产(RTM)后的 1999 年末就开始使用。

AD 中的信任(Trust)是什么?

信任(trust)是森林和/或域之间的一种关系。

在 AD 森林中,当每个域被添加时,会创建 two way transitive trust ,因此该森林中的所有域都会彼此信任。这使得身份验证能够从一个域传递到同一森林中的任何其他域。

你也可以创建 trusts outside of the forest ,与其他 AD DS 森林和域,或 Kerberos v5 域实现。

Windows NT 4.0 的年代,没有“森林”或分层结构。如果你有多个域,就必须手动在它们之间创建信任关系。在 Active Directory 中,同一森林中的域之间会自动具备双向的传递信任。回到 Windows NT 4.0 的时候,你还得使用 NetBIOS 来建立信任!

幸运的是,技术进步很大,如今我们拥有了更多的信任功能,尤其是在 securing trusts 方面,可以通过选择性身份验证和 SID 过滤来加强安全性。

域中的每个信任都会存储为 trustedDomain object (TDO) ,位于 System container 中。因此,要查找并 列出域中的所有信任 以及信任类型(域名为 contoso.com )请运行以下 Get-ADObject –SearchBase “cn=system,dc=contoso,dc=com” –Filter * -Properties trustType | where {$_.objectClass –eq “trustedDomain”} | select Name,trustType Windows PowerShell 命令

4 个有效值可用于 trustType 属性。不过,只有值 1(表示与 NT 域的信任)以及值 2(表示与 Active Directory 域的信任)较为常见。关于存储在 trustedDomain 对象中的信任信息,还有很多其他有用的资料。

在名称为 contoso.com 的域中,运行以下 Get-ADObject –SearchBase “cn=system,dc=contoso,dc=com” –Filter * -Properties * | where {$_.objectClass –eq “trustedDomain”} | FL Windows PowerShell 命令 ,以查看所有 信任属性

通过运行以下 Get-ADTrust –Filter * 命令,也可以查看信任的许多核心属性。

信任属性

下表显示 trust properties 以及每个属性的说明。

Trust property

Property description

Direction

Valid values are bidirectional, inbound, or outbound. Note that the direction is relative to the domain in which you are running the query.

DisallowTransivity

I think this is a Microsoft typo as it really should be “DisallowTransitivity”. This can be set to True or False based on whether the trust disallows tranitivity.

DistinguishedName

The DN of the trusted domain object.

ForestTransitive

This is set to True when a forest trust is transitive and False when a forest trust is non-transitive.

IntraForest

This is set to True when a trust is between domains in the same forest or set to False when a trust is between domains in different forests.

IsTreeParent

Valid values are True and False.

IsTreeRoot

Name

The name of the domain that is part of the trust, not the domain where the query is run.

ObjectClass

This is set to trustedDomain for trusts.

ObjectGUID

Globally unique identifier for the trust. An example is de207451-51ed-44cd-4248-85ad9fcb2d50.

SelectiveAuthentication

Set to True if the trust is configured for selective authentication or False if it isn’t.

SIDFilteringForestAware

Set to True if a forest trust is configured for selective authentication

SIDFilteringQuarantined

Set to True when SID filtering with quarantining is used for a trust. Used for external trusts only.

Source

Set to the DN of the trust root. In a forest trust, the DN of the root domain of the forest is the source.

Target

Set to the domain name of the other side of the trust.

TGTDelegation

Set to True if Kerberos full delegation is enabled on outbound forest trusts. Default is False.

TrustAttributes

Set to a numerical value indicating the trust configuration. For example

TrustedPolicy

Undocumented

TrustingPolicy

Undocumented

TrustType

Set to Uplevel for trusts with Active Directory forests and domains, DownLevel for trusts pre-Active Directory domains such as NT 4 domains, Kerberos realm for trusts with Unix/Linux realms.

UplevelOnly

Set to True if only Windows 2000 and later operating systems can use the trust link.

UsesAESKeys

Set to True for realm trusts that use AES encryption keys.

UsesRC4Encryption

Set to True for realm trusts that use RC4 encryption keys.

从可扩展性角度来看,有几件关于信任(trust)需要你 be aware of

  • 用于 Kerberos 身份验证的信任(trust)最大数量。

如果位于受信任域(trusted domain)的客户端尝试访问信任域(trusting domain)中的资源,当“truth path”包含超过 10 trust links 时,客户端将无法进行身份验证。在信任数量较多且信任路径较长的环境中,应实现“shortcut trusts”以提升性能,并确保 Kerberos 身份验证功能正常工作。

  • 信任(trust)超过 2,400 个后,性能会下降。

在规模很大且复杂的环境中,你可能会拥有海量的信任(trust)。当你达到 2,400 trusts 之后,向环境中新增的任何信任都可能在现有信任的基础上显著影响性能,尤其是与身份验证相关的部分。

有关 Active Directory 基础的更多信息,你可以在我们的 AD tutorial for begginners 中找到。

分享到

了解更多

关于作者

Asset Not Found

Brian Svidergol

IT

精通以 Windows、Active Directory、Azure、Microsoft Exchange、System Center、虚拟化和 MDOP 为核心的 Microsoft 基础架构与基于云的解决方案。除了撰写书籍之外,Brian 还编写培训内容和白皮书,并担任大量图书与出版物的技术审阅者。