security

Test approval records for high-impact automation

Run a safe approval rehearsal for an automation action and verify that the approval evidence includes the actor, target and outcome of the exact request.

TrustIvan · · 10 min read

A support automation creates a draft refund in a test tenant. An operations lead approves one refund of 25 test units. The worker later retries a job describing 250 units because the underlying draft was edited after it entered the queue. A timeline that says “approved, then succeeded” does not tell the reviewer which version the person approved. The approval has to follow the exact action from presentation to enforcement and from the external effect to its record.

Use a harmless surrogate for the real action. Retain the same decision, identity and timing boundaries without using money, customer data or production permissions. A good rehearsal demonstrates who reviewed a particular request and whether the worker executed only the action it was authorized to execute.

Define the boundary that authorizes the side effect

Identify which component prepares the proposal, which captures a decision, and which has authority to perform the consequential operation. A chat response, a confirmation in a user interface and an enforced authorization at the execution boundary can be distinct events. Record the intended design so evaluators know where to check. Keep preview, read-only inquiry and actual execution distinct in the audit view when they have different effects.

Decide which types of changes are considered high-impact according to your policy. Use scoped examples, such as submitting a test refund, changing one synthetic tenant's storage retention setting, or promoting a fixture job into a restricted staging queue. Select a non-production target with no connection to live customers, externally delivered messages or real credentials. An approved simulator can produce meaningful events when the actual downstream system cannot be exercised. Document which pieces the simulator provides.

Name the worker principal separately from the human initiating the request and the human authorizing it. The reviewer should know who reviewed the proposal and under whose authority the automation acted. If a broker issued a short-lived identity or a gateway made a policy decision, record their roles. These identities help reconstruct the result when several workflows use the same underlying service account.

Keep the version of the request that the reviewer saw

Write a record containing a stable request reference, action type, tenant and target, scope, approved parameter values or a safe immutable reference, reason and requested deadline. Include workflow version and the inputs needed to distinguish a safe draft from an executable action. Beware mutable objects and links. An approval tied only to a ticket number does not establish whether the amount or destination changed before execution.

Bind the approval to the relevant version of the request, label which fields may vary safely, and define what invalidates the permission. A queue timestamp or retry count could legitimately change without affecting scope. Target, amount or operation changes may require new approval. Have the enforcing system check the association at the documented decision boundary. Keep the approval identifier and policy result in the execution record.

Include the human-readable decision as well as its structured record. An approver should be able to see which target and bounded effect they are authorizing, while an auditor should be able to compare the structured values programmatically. If some parameters are restricted, use an approved digest or masked reference rather than logging a sensitive payload. The worker still needs evidence that it compared the approved request to the one it executed.

Verify a realistic sequence in a synthetic refund ledger

Create a fixture tenant with test invoice I81 and a harmless ledger endpoint. The draft version V1 requests 25 test units. The worker records a request to the simulated external ledger. The ledger can confirm durable results and preserve a unique request identity for the rehearsal. Set reviewer and worker roles independently.

ScenarioExpected authorization behaviorEvidence to retain
Approved V1 starts within scopeSubmit refund once to I81 in the fixture tenantApproval A17, V1, worker session and final ledger reference
V2 changes the amount to 250Keep the modified request pending until it has its own qualified decisionV1 approval, V2 identifier, enforced pending disposition
Request received after approval expiresPrevent the consequential action under the documented expiry policyApproval expiry, worker decision time, no committed fixture result
Requester attempts own approval under a two-person ruleRecord rejection or route for another eligible reviewerInitiator role, attempted approver role and policy result
Worker times out after the ledger commitReconcile via the approved request identity, and preserve original scopeFirst attempt, confirmed external outcome, later retry disposition

Start with the successful case. Have the approver read the request details and approve V1 before the worker receives permission. Record requested, approved, admitted and executed times. Compare the durable test ledger action with the approval's version, amount and target. Ask the observer to identify these facts from the exported logs. A timeline with all events needs enough correlation to show they belong to the same action.

Then edit the fixture draft while the worker waits. A newly generated request needs its own identifiable version and authorized decision when the amount changes under the policy. Keep the original approval trace so the reviewer can explain why the new submission did not proceed. Re-run the test with a non-material change, such as a safe display note, if the policy allows it. Verify both outcomes rather than assuming all editor changes are equivalent.

Treat action execution and verification as separate events

A worker may leave a record saying it started the execution path while the downstream system rejects the request. It can also time out after the downstream system completed it. Save the worker's observed result and the durable downstream outcome where supported. For a test refund, the fixture ledger reference answers whether one refund was actually stored. A success notification or a job marked complete gives different evidence.

Test an interrupted completion callback. Compare the action's request identity against the final downstream result before retrying. Use the application's supported reconciliation process and test duplicate control in the fixture. Check whether automation queues can trigger more than one attempt and whether the permission applies to a single logical action or a defined set. Even a second identical outcome may be outside a one-use approval. Record whether the limit was enforced when evidence becomes available.

Record how expiration is evaluated across the queue. A request placed at 14:59 can start at 15:01, after an approval with a 15:00 cutoff. Policy should say which clock and event govern admission and execution. Measure the actual observed times. Include a test of the exact boundary and a case where a worker pauses after checking the decision. Any reconsideration should be visible as an explicit review, not a silent extension.

Test the approval itself and who can grant it

Verify the role and organization of the reviewer at decision time. Where your policy requires independent approval, rehearse an attempted self-review and an account with view-only rights. Also test a role removed after the request was created, and establish whether the organization evaluates current permission at admission. The durable record should show the decision maker, role or authorization evidence, and the configured outcome for the operation.

In a different implementation, a continuous delivery environment may wait for authorized review before a deployment job proceeds. GitHub documents environment review behavior and the optional control that prevents a requester from approving their own deployment. Use documentation for the configured service and subscription. An environment review mechanism is one possible boundary. The test still needs evidence that the reviewed release corresponds to the running instance. GitHub deployment reviews.

Walk through a denial, a withdrawn request, an expired permission and an approved action that never executes. Confirm which decisions were enforced at the edge that can perform the action. Mark unexecuted terminal states explicitly. A history that shows approved without recording cancellation can be confusing if the worker later processes an unrelated action on the same account.

Preserve a safe and reviewable export

Retain the initiating identity, approver, worker principal, request and version identifiers, target and scope, policy result, relevant times and observed execution result. Link one approval to its many related events through approved correlation rather than recording every raw request field. Use approved logging and access controls. OWASP's logging guidance describes including relevant event attributes while excluding sensitive information that the audit does not require. OWASP Logging Cheat Sheet.

Check whether an exported timeline still has meaningful source identities after redaction. A downstream provider request ID can help a service owner retrieve details while keeping their sensitive data outside the security team's exported review. Ask another operator to open the export with their normal permissions, reconstruct the exact target and approval, and identify any unknown state. If the original proof requires a separate authorized observer, document which question that person can answer.

Now simulate a logging delay. The authorization decision is visible from one event source while the external result has not yet arrived. Record execution as unresolved at the point of review, and record the later observation separately when reconciled. Logging delays should not change the enforcement state. Test how the system represents both the original decision and the time at which a complete audit record became available.

Confirm the policy uses the same units and target that the reviewer saw

Add a fixture that shows 25 test units in the review screen and stores the precise equivalent in the smallest denomination used by the synthetic ledger. Have a reviewer inspect both authorized and executed records. They should agree on the underlying amount and actor, even if the application displays them differently. Treat a calculation or status mismatch as an unresolved test result. Validate locale and rounding conditions if the same workflow will be operated in several regions.

Include two fixture invoices with similar names in different tenant scopes. Review the first invoice and confirm a separate request aimed at the second stays separate. The operator should be able to identify both targets through their safe stable references. An approval screen that hides a meaningful scope difference weakens the decision even when the execution system correctly denies the alternate request. Capture how that ambiguity is resolved in the actual interface.

Compare sustained evidence through the same rehearsal

Give each evaluator the same harmless action and the same valid, changed, expired and duplicate cases. Observe whether they can confirm authority at the side effect, attribute the result to the correct worker, and provide a safe, independently reviewable export. Compare which controls run automatically and which depend on integrations or a human record. Use the high-impact agent action guide and the workflow delegation review guide for related authority and identity criteria.

A reviewer trying to close this exercise needs to answer three questions with retained evidence. What did the person authorize, what did the worker actually attempt, and what did the target system confirm? The test is complete when the expected cases cover those answers, including where execution was prevented and where the result remained unknown.