Skip to main content
The TLA+ specification models the AD tier model as a state machine, verifying that safety properties hold across all possible sequences of administrative operations. It uses the TLC model checker to exhaustively explore the state space.

Overview

TLA+ (Temporal Logic of Actions) is a formal specification language developed by Leslie Lamport. It excels at modeling concurrent and distributed systems where correctness depends on the order and interleaving of operations. For the AD tier model, TLA+ verifies that:
  • No administrative action can create cross-tier access
  • Credentials never leak from higher to lower tiers
  • Service accounts remain properly hardened
  • Group nesting never creates circular dependencies
The specification implements the equivalent of LDAP’s LDAP_MATCHING_RULE_IN_CHAIN (OID 1.2.840.113556.1.4.1941) for transitive group membership resolution.

Core Type System

The specification defines the fundamental types and their relationships:
AdminGroups represents the subset of groups that grant administrative privileges within a tier. The exact membership is defined by your organization’s tier model implementation.

State Variables

The model tracks the following state:

Helper Functions

Transitive Group Closure

Computes all groups a principal belongs to through nested membership:

Access Validation

Determines if a user can access a resource based on tier assignment:

All Group Memberships

Returns combined direct, nested, and primary group memberships:

Safety Invariants

The specification defines 10 core safety invariants that must hold in every reachable state.

1. TierIsolation

No user can hold administrative privileges across multiple tiers:
This invariant limits blast radius, if an administrative account is compromised, the attacker only gains access to a single tier rather than the entire environment.

2. Tier0InfrastructurePlacement

Critical infrastructure must remain assigned to Tier 0:

3. GpoRestrictionsValid

Each tier must deny logon from other tiers via GPO:

4. ObjectTierConsistency

Admin group memberships must align with assigned tier levels:

5. NoCrossTierSessions

Active sessions must respect tier boundaries:

6. Tier0CredentialsProtected

Tier 0 credentials cannot be cached on lower-tier systems:

7. Tier1CredentialsProtected

Tier 1 credentials cannot be cached on Tier 2 systems:

8. NoCircularGroupNesting

Groups cannot transitively contain themselves:

9. PrimaryGroupConsistency

Primary group assignments must match object tier assignments:

10. ServiceAccountHardening

Privileged service accounts must be properly secured:

Compliance Detection

The specification identifies and quantifies violations:

Violation Types

Compliance Score

Administrative Actions

The specification models 12 state transitions. The key actions are shown below:
Additional actions include RemoveFromTierGroup, RemoveNestedGroupMembership, SetPrimaryGroup, DesignateTier0Infrastructure, RemoveTier0Infrastructure, DisableAccount, EnableAccount, and UpdateLastLogon. See the full specification for details.

MoveObjectToTier

Moves an object to a different tier with hardening validation:

AddToTierGroup

Adds an object to a tier group, preventing cross-tier membership:

AddNestedGroupMembership

Adds a group as a member of another group, preventing cycles:

HardenServiceAccount

Marks a service account as sensitive and disables interactive logon:

Complete Specification

The full specification combines the initial state, next-state relation, and fairness conditions:

Running the Model

Prerequisites

  1. Download and install the TLA+ Toolbox
  2. Clone the ADTierModel-Rust repository

Model Configuration

The ADTierModel.cfg file configures the model checker. TLC configuration files use the following format:
The StateConstraint operator bounds the state space for finite model checking:

Running TLC

  1. Open ADTierModel.tla in the TLA+ Toolbox
  2. Create a new model using the configuration
  3. Run the model checker
TLC will explore all reachable states and report any invariant violations with a counterexample trace showing the sequence of actions that led to the violation.
The model with the default configuration typically explores several thousand states. Larger configurations exponentially increase the state space.

Interpreting Results

No Violations Found

If TLC completes without errors, the tier model design is verified to maintain all safety invariants under the configured constraints.

Violation Found

TLC provides a trace showing:
  1. The initial state
  2. Each action taken
  3. The state where the invariant was violated
  4. Which invariant failed
Use this trace to identify gaps in your administrative procedures.