Domains, forests, and trusts in Active Directory
Riley at Cedar Inc. needs to open a budget workbook on a server at Northwind, and neither company wants the other's administrators running its servers. This lesson shows how Active Directory's domains and forests set the boundaries, how a trust between two forests has a direction and a reach, what organizational units do and do not change, and how both sides review the arrangement.
Names, administration and trust
Cedar Inc. and Northwind are planning next year's budget together, and Northwind keeps the shared workbook on its project server, projects.northwind.example. Riley, in Cedar's finance team, needs to open it. Northwind is happy to let Riley in. It is not happy to let Cedar's administrators run Northwind's servers, and Cedar feels the same way in reverse. Both companies run Active Directory, and the way their directories are structured decides how narrow they can make this arrangement.
The smallest unit to start from is the domain from How Kerberos tickets work. A domain is a collection of users, computers and groups that share one database, replicated across that domain's domain controllers, and one KerberosA ticket-based authentication protocol, used by Active Directory, in which a key distribution center issues time-limited tickets. A user presents a ticket to each service instead of sending a password. realm. Cedar has two: cedar.example for most of the company, and eu.cedar.example for its European offices, which have their own administrators for day-to-day work. Riley's account lives in cedar.example.
Cedar's two domains belong to one forest. A forest is a set of domains that share a schema, the definition of which kinds of objects and attributes exist, and a configuration, and whose domains automatically trust one another. Northwind's domains form a separate forest rooted at northwind.example.
The forest, not the domain, is the security boundary. Administrators at the top of Cedar's forest can reach into eu.cedar.example whatever the European administrators prefer, and a determined administrator of either domain can usually find a way to affect the other. Creating eu.cedar.example gave Cedar's European offices their own administration, not isolation. Nothing in Cedar's forest, however, gives anyone authority inside Northwind's. That separation is why the two companies need an explicit agreement before Riley can open the workbook.
A trust has direction and scope
The agreement is a trust: a configured relationship in which one domain or forest accepts authentication performed by another. Northwind's project server cannot check Riley's password, because it lives in Cedar's directory. With a trust in place, Northwind accepts Cedar's word for who Riley is. In Kerberos terms, Riley's laptop asks Cedar's KDC for a ticket to the Northwind server, receives a referral ticket encrypted with a key the two forests share, and presents it to Northwind's KDC, which issues the service ticket. The exchanges are the ones from Riley's Monday morning, with one more hop between the two KDCs.
Every trust has a direction, and the direction is the part people most often get backwards. The trusting side holds the resources and accepts identities. The trusted side holds the accounts and vouches for them. Access flows the opposite way from trust: Northwind trusts Cedar, so Cedar's people can be granted access to Northwind's resources.
| Question | Answer for this collaboration |
|---|---|
| Trusting forest, which holds the resource | northwind.example |
| Trusted forest, which holds the accounts | cedar.example |
| Direction of the trust | Northwind trusts Cedar: an outgoing trust on Northwind's side, incoming on Cedar's |
| Direction of access | Cedar users toward Northwind resources, the opposite of the trust |
| Northwind user opening a Cedar folder | Refused: this is a one-way trust |
| What lets Riley open the workbook | Northwind's own permission on the project, granted to Riley or a group Riley is in |
Northwind trusts Cedar
- Trusting side
- northwind.example
- Trusted side
- cedar.example
- Riley opens the workbook
- Yes, with Northwind's permission
- Northwind users at Cedar
- Refused
What the collaboration needs
Cedar trusts Northwind
- Trusting side
- cedar.example
- Trusted side
- northwind.example
- Riley opens the workbook
- Refused
- Northwind users at Cedar
- Can be granted access
Built the wrong way round
Access flows the opposite way from trust.
The table and figure show two failures Northwind and Cedar should test before anyone relies on the trust. Suppose an administrator builds the trust the wrong way round, so that Cedar trusts Northwind. Riley still cannot open the workbook, however correct the project's permission is, because Northwind does not accept Cedar identities. Meanwhile Northwind's users could now be granted access to Cedar's resources, which nobody asked for. The repair is to correct the direction for this one collaboration, not to add a second trust the other way just to make the error go away.
The last row matters as much as the direction. A trust lets Northwind recognize Riley. It grants nothing. If Northwind has not given Riley permission on the project, Riley is authenticated and refused, exactly as a Northwind employee without that permission would be.
Trusts also differ in how far they reach. Transitivity describes whether a trust extends through a chain. Inside a forest, the trusts between domains are transitive, so a European Cedar employee is accepted wherever cedar.example accounts are. A forest trust covers every domain in both forests, but it does not pass through to a third forest that Cedar happens to trust. Transitivity and direction are separate properties, and neither is a resource grant.
Northwind can narrow the trust further. With selective authentication, Cedar users can authenticate only to Northwind servers where Northwind has explicitly allowed it, so the trust reaches the project server and nothing else. Every account and group in Active Directory has a security identifier (SID): its domain's identifier followed by a number for the account or group, and these SIDs are what the PAC lists. SID filtering, on by default for forest trusts, makes Northwind's domain controllers drop SIDs in a Cedar ticket's PAC that do not belong to Cedar's own forest. That includes any that claim membership of a Northwind group, so a Cedar administrator cannot slip one in, and also any that name a third, unrelated domain. It does not question legitimate Cedar group memberships. A SID from inside Cedar's forest still passes unless Northwind restricts the trust further, including one added through SID history, the attribute that lets an account moved between domains keep its old SIDs. Northwind can also refuse to let Cedar services act on behalf of users across the trust. Each of these settings should match the collaboration that was agreed, not a broad default chosen because it was quicker.
Organizational units are delegation tools
Inside a domain, accounts are arranged in organizational units (OUs), containers that group objects so they can be administered together. Cedar keeps Riley in OU=Finance,OU=Staff,DC=cedar,DC=example, a distinguished name read from the inside out: the Finance OU, inside the Staff OU, in the cedar.example domain. Cedar's help desk has been delegated permission to reset passwords for accounts under the Staff OU and nothing else, and stricter settings for finance accounts and laptops, such as a shorter screen lock, are attached to the Finance OU.
When Cedar moved Riley into Finance from the Sales OU last year, the finance settings began to apply to Riley's account. Riley's group memberships did not change, and neither did any resource permission or any boundary between forests. An OU is still inside the domain and the forest. Grouping Riley's account more carefully does not isolate it from the forest's administrators, and it gives Riley no new standing at Northwind.
Changes also take time to arrive. A new group membership written on dc1.cedar.example replicates to Cedar's other domain controllers over minutes, and longer between sites. A group that Riley joined after signing in does not appear in Riley's current TGT, because the ticket carries the groups as they were when it was issued. When someone asks why Riley was refused at 10:15 after being added at 10:05, the answer depends on which domain controller answered and when Riley's ticket was issued, so record both rather than assuming every domain controller already had the change.
Review both sides of the agreement
A forest trust is configured by the most powerful administrators on each side, and a careless change can open far more than one workbook. Northwind should know who can create or change its trusts, who can grant Cedar users permission on its resources, and which servers selective authentication allows. Cedar should know the same about anything it lets Northwind users reach.
Before the budget work starts, the two companies test four paths: Riley opens the workbook, a Northwind user trying to reach a Cedar folder is refused, Riley trying to reach an unrelated Northwind server is refused, and a Northwind employee's own access to the project still works. When the collaboration ends, Northwind removes Riley's permission on the project and later the trust itself, then confirms that Riley is refused while Northwind's administrators keep full control of their own forest. Throughout, each company keeps its own administrators and its own recovery accounts, the same separation of agreement and local grant that Partners and guests from other organizations kept for cloud applications, so the trust never becomes a back door from one organization's administration into the other's.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Apply SID filtering to a cross-forest ticketRead the group SIDs in a Cedar ticket and Northwind's own domain SID, work out which SIDs a forest trust's SID filtering drops, and see why direction and filtering are separate from a resource grant.