Skip to content

Recovery Dependency Plan Lab

github-actions[bot] edited this page Nov 30, 2026 · 1 revision

Last reviewed: 2026-11-29 (stdlib validator and synthetic example executed locally; no infrastructure, backup, identity provider, DNS service, or production system was contacted)

Purpose

Turn a recovery dependency map into a machine-checked plan before an exercise. The validator catches references to missing services, self-dependencies, cycles, duplicate identifiers, later-tier prerequisites, incomplete restore-source records, and services without both functional and security acceptance checks.

It then produces deterministic recovery waves and a critical-path planning estimate. The estimate is the sum of operator-supplied durations along the longest dependency path. It is not a measured RTO and does not prove that any service can be restored.

Evidence Boundary

This lab is deliberately offline and non-operational:

  • It reads JSON and writes a report; it has no socket, subprocess, cloud SDK, or infrastructure code.
  • All services, IDs, durations, owners, credentials, checks, and evidence references in plan.example.json are synthetic illustrations.
  • A valid graph proves only that the documented dependencies are internally consistent under this schema.
  • An exercise must still execute each restore procedure, preserve the evidence named in the plan, and obtain the service owner's acceptance.
  • Parallel work within a wave is an ordering possibility, not a claim that staff, hardware, licences, network capacity, or restore media are available concurrently.

The contract operationalizes two primary-source requirements without claiming more than they say:

  • NIST SP 800-61 Rev. 3, RC.RP-04 R1: validate that essential services are restored in the appropriate order. RC.RP-04 R2/R3 and RC.RP-05 require owner confirmation, monitoring, integrity and correctness checks.
  • NIST SP 800-209, RA-SS-R2/R4: protect dependent components such as directory, DNS, external key management and build systems, and evaluate RTOs with all related components.

Files

File Role
plan.example.json Nine-service synthetic plan using reserved example descriptions
validate_plan.py Non-executing schema, graph, wave and estimate validator
evidence/example-plan-report.json Deterministic report regenerated and compared by unit tests
tools/tests/test_recovery_dependency_plan.py Positive, negative, CLI and evidence-regression tests

Contract

Each service records:

Field Validation
id, name, owner, tier Stable lowercase ID, named owner and integer tier 0โ€“9
dependencies Existing service IDs only; no duplicates, self-reference, cycles or later-tier dependency
estimated_restore_minutes Positive planning input; never described as an observation
target_rto_minutes Positive business target; an estimate over target produces a warning
restore_source Type, precise reference and integrity-record reference
credentials Recovery mechanism and separately managed location; no secret values belong in the plan
acceptance_checks Unique checks with procedure and evidence; at least one functional and one security check per service
evidence_required Artifacts needed to support the eventual exercise result

Dependencies point from a service to what it needs first. A service appears in wave 0 only when it has no dependencies. Later waves contain services whose dependencies are all in earlier waves.

Run

From the repository root:

python3 -B IncidentResponse/Recovery/labs/dependency-plan/validate_plan.py \
  IncidentResponse/Recovery/labs/dependency-plan/plan.example.json \
  --format markdown

Write a new JSON evidence file (the command refuses to overwrite an existing path):

python3 -B IncidentResponse/Recovery/labs/dependency-plan/validate_plan.py \
  IncidentResponse/Recovery/labs/dependency-plan/plan.example.json \
  --output /tmp/recovery-dependency-report.json

Exit codes:

Code Meaning
0 Contract and graph are valid; warnings may still require action
2 Plan parsed, but validation failed
3 Input/output, encoding, JSON or overwrite error

Run the offline regression suite:

python3 -B -m unittest tools.tests.test_recovery_dependency_plan -v

Using It In An Exercise

  1. Copy the example and replace every synthetic row with an approved service record; do not put passwords, tokens, recovery keys or private client evidence in Git.
  2. Review dependencies with identity, network, application, backup, security and business owners. The tool cannot discover an omitted dependency.
  3. Run the validator and resolve every error. Review warnings rather than suppressing them.
  4. During the exercise, do not start a service merely because its wave is ready. Confirm every dependency's acceptance checks passed and retain the named evidence.
  5. Record observed start/end times separately. Compare observed results with targets in RPO & RTO validation; never replace the planning estimates in this file with an unsupported claim.
  6. Feed missing dependencies, failed checks and resource conflicts back into the plan and rerun it.

Recovery dependency mapping ยท Recovery index ยท Verification protocol


๐Ÿ“„ Source: IncidentResponse/Recovery/labs/dependency-plan/README.md | โœ๏ธ Suggest an edit | โฌ…๏ธ Back to Incident Response

Clone this wiki locally