◇ OpenCyber Academy
Professional · Lesson 7 · English

Bind approval to one versioned action envelope

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Day 2 — Bind approval to one versioned action envelope

Learning decision. Decide whether a favorable approval record still applies to the operation the operator is about to perform. An action envelope is a tuple, not a verb: case / revision / purpose / operation / target / environment / selected fields or affected objects / time range / operator / service consequence / expiry / verification / rollback owner. A changed target, environment, operator or method is a changed request. The safe transition is new review, even when the button label has the same English verb. A reference number records the decision; it does not authenticate the sender or prove that the operator acted.

In W2 only, suppose SIM-DEC-01 declares approval of revision 1 for a read-only export of selected S42 fields in a training environment, covering 13:50–14:10 UTC, with a training custodian as operator and a 14:20 UTC expiry. It says nothing about production, S40, all identity events, a session restriction, or svc-training-enroll disablement. An operator proposal that expands the object set to ALL_SLOTS must be returned for a new scope and business-impact decision. Editing the old request in place would make the approval receipt appear to cover a decision never made. Store the original proposal and the new revision separately.

The following Python 3 standard-library, offline, read-only fixture tests tuple matching and an expiry boundary. It is a classroom classifier; its invented approval reference, role name and timestamp are not a signature, identity proof, collection receipt or production authorization. Predict the five lines before running it in a local Python interpreter.

from datetime import datetime

approved = {
    "revision": 1, "action": "read_export", "target": "S42",
    "environment": "training", "fields": ("slot", "event_time", "request_id"),
    "range": "13:50..14:10 UTC", "operator_role": "training_custodian",
    "valid_until": "2026-05-01T14:20:00+00:00", "reference": "SIM-DEC-01",
}
bound = ("revision", "action", "target", "environment", "fields", "range", "operator_role")
request = {key: approved[key] for key in bound}

def gate(proposal, decision, at):
    if decision is None or not decision.get("reference"):
        return "NO_DECISION_RECORD"
    if any(proposal.get(key) != decision[key] for key in bound):
        return "REAPPROVAL_REQUIRED"
    if datetime.fromisoformat(at) >= datetime.fromisoformat(decision["valid_until"]):
        return "EXPIRED"
    return "MATCHES_DECLARED_TUPLE_ONLY"

print("original:", gate(request, approved, "2026-05-01T14:10:00+00:00"))
print("wider_target:", gate({**request, "target": "ALL_SLOTS"}, approved, "2026-05-01T14:10:00+00:00"))
print("new_revision:", gate({**request, "revision": 2}, approved, "2026-05-01T14:10:00+00:00"))
print("at_boundary:", gate(request, approved, "2026-05-01T14:20:00+00:00"))
print("missing_record:", gate(request, None, "2026-05-01T14:10:00+00:00"))

Expected exact output, reproduced for this fixture:

original: MATCHES_DECLARED_TUPLE_ONLY
wider_target: REAPPROVAL_REQUIRED
new_revision: REAPPROVAL_REQUIRED
at_boundary: EXPIRED
missing_record: NO_DECISION_RECORD

The output is deliberately not AUTHORIZED_TO_EXECUTE. This small function cannot validate delegation, approved service impact, the authenticity of SIM-DEC-01, the operator's identity, an execution receipt or effect. The at_boundary line makes the comparison inclusive: at 14:20, the declaration is expired. That expiry is an approval limit, unrelated to C01's ambiguous data-retention “24 hours.” A real procedure must also handle clock source, revocation and concurrent revisions. A passing fixture result is never a reason to perform a tenant action.

Worked example. The cloud tool offers a checkbox labeled “include all slots” while the W2 approval names only S42. Selecting it changes target to ALL_SLOTS; the classifier returns REAPPROVAL_REQUIRED. The operator should stop, record the mismatch, and ask whether a wider, separately assessed request is appropriate. They must not claim that the selected S42 export was collected. If the original narrow export later runs, an independent source receipt and selection check are still needed before calling its result verified.

Practice. Work EX007 with the main C02 checkpoint, keeping approval, operator, execution and verification pending. Add a new revision column for a hypothetical scope expansion and state exactly why the old revision does not cover it. Compare with the worked answer and its Week 2 application. Limit: the W2 code checks declared fields only, and C02 has no approval specimen at all. Previous: Day 1 · Week index · Next: Day 3.

Exercise for this lesson

EX007 — Action request. Input: the cloud colleague's “disable now” question at 09:04. Draft a proposed action record with target, trigger, service risk, approval, operator, expiry and verification. Fields unsupported by C02 must say pending, not contain invented receipts. A 2-point result recommends a bounded first step rather than asserting account misuse.

Worked answers

EX007 — Model action request. CTN-IR-014 / A-01: trigger C02 report received 09:04; proposed first action is bounded support validation and owner contact, not disablement. Target S42 symptom and relevant service owner; expected effect better state/context with no service disruption. Account disablement is a contingent alternative whose target, time limit, service dependency, rollback and success check must be agreed before approval. Approval = pending; operator = pending; execution time = blank; verification = pending. The cloud colleague's question is not a receipt of any of these steps.

Additional worked reasoning (EX007 — Versioned proposed action.): Record CTN-IR-014 / A-01 / v1, evidence C02 at 09:04, proposed first step a service-owner-confirmed read-only S42 state question, and conditional later account restriction whose trigger is not yet observed. State target and training/production distinction, legitimate enrollment cost, missing approval, missing operator, prohibited premature execution, and next check. A strong answer labels approval/collection/execution pending rather than inventing a 09:04 receipt. If cloud operations offers a broader operation than requested, resubmit the envelope; do not treat a shared verb as equivalent authority.

Week 2 applied result (EX007). A valid main-case v1 is CTN-IR-014 / A-01 / v1, purpose verify reported S42 availability, target S42 authoritative state, no disruptive method, source C02 received 09:04, service owner/custodian to be identified, approval/operator/collection/verification pending, next review owner response or corroborating permitted record. A hypothetical v2 that adds ALL_SLOTS or a session/account change is a new approval request, not an amendment covered by v1. In the separate W2 classroom fixture, SIM-DEC-01 binds only revision 1, read-only S42 training fields, 13:50–14:10 UTC, the training custodian and a 14:20 expiry. The five program lines are MATCHES_DECLARED_TUPLE_ONLY, REAPPROVAL_REQUIRED, REAPPROVAL_REQUIRED, EXPIRED, NO_DECISION_RECORD in order. None is an authenticated approval or an export receipt.