Bypassing approval often requires no stolen password. A user can call the next step directly, alter the object after approval, abuse delegation, or run two operations concurrently. Everyone remains signed in to their own account, yet the server executes a decision that nobody made for that version of the data.

The assessment should follow more than roles. It must preserve the invariant: who approved what version, amount, and conditions. This is narrower than a general business-logic audit of payments and refunds: the object here is approval integrity.

Write the Approval Invariant

“Two approvals are required” is incomplete. State the operation type, amount thresholds, mandatory roles, separation of duties, permitted delegation, and the point at which a decision becomes effective. Define whether the initiator can approve and whether a decision can be reused.

A useful invariant says: “Payment version V for amount S executes only after approval by the finance manager and budget owner assigned to the unit at decision time; changing payee, amount, or currency creates a new version and revokes prior approvals.”

The invariant also covers rejection, withdrawal, and expiry. A rejected version cannot be reopened by replaying an old request; execution fails after withdrawal; and approval past a business deadline follows an explicit policy.

Bind the Decision to a Request Version

Approval should reference an immutable snapshot or digest of security-relevant fields. If the payee, amount, attachment, tenant, or operation type can change without a new decision, the interface displays approval history but does not protect the executed action.

Test every update path: UI, direct API, import, bulk action, integration, and background job. Optimistic locking or a version number should reject stale approval. The log preserves old and new versions, the editor, and the reason for revocation.

Choose digest fields by risk. Hashing only an update timestamp can omit a bank account stored in another table, while binding the entire database is impractical. List the material fields and their canonicalization.

Scroll sideways to compare

Transition riskTestExpected resultEvidence
Skip a stepCall execute before approveServer denies independently of the UIResponse and unchanged state
Change after approvalEdit amount or payeeNew version; approvals revokedVersions and revocation log
Replay approvalRepeat an old requestNo extra vote or executionDecision identifier
DelegationApprove as substituteTime, scope, and role conflict checkedAuthority record
ConcurrencyApprove and edit togetherDefined order or explicit conflictTransaction timeline

Check Authority at Decision Time

Authentication establishes identity, not authority for a particular operation. For every transaction, the server checks the active role, organizational unit, limit, object relationship, and separation-of-duty constraints. A hidden client-side button is not a control.

Test role hierarchies separately because inherited roles can grant excessive authority. Organizational transfer, role revocation, and temporary privilege affect new decisions. For existing approvals, the policy must state whether they remain valid until execution or are revalidated.

The time semantics must be consistent. If authority at approval time is sufficient, preserve evidence of that state. If authority must remain valid at execution, role revocation blocks the operation. Neighboring endpoints must not apply different rules accidentally.

Model Delegation as Limited Authority

A delegation has a principal, substitute, period, object scope, amount limit, and reason. It is not a full copy of a role. Test overlapping delegations, chains of substitutes, self-approval, and the case where one person acquires both mandatory roles.

After expiry, new decisions are denied. At execution, the system either retains evidence of authority at approval time or revalidates it according to a stated policy. The audit log shows both the human actor and delegating principal.

The policy explicitly allows or forbids a substitute from delegating again. If allowed, preserve the full chain; deleting the current delegation must not remove the origin of a historical decision.

Test approval integrity
  1. CreateRecord initiator, material fields, version, and required authorities
  2. DecideCheck active role, scope, limit, separation of duties, and delegation
  3. ChangeCreate a new version and revoke decisions affected by changed fields
  4. ExecuteAtomically verify state, version, and the set of valid approvals
  5. AuditPreserve actors, versions, reasons, order, and outcome without rewriting history

Test Concurrent and Replayed Requests

Two requests can read the same state and both pass checks before either writes. Test parallel approval, editing during approval, execution concurrent with revocation, and redelivery of a message. The result should match an allowed serial order or return an explicit conflict.

Do not rely on a button disabled after a click. Use atomic conditional updates, decision uniqueness, and an idempotent execution identifier. Database isolation helps, but the application invariant and external effects still need explicit logic.

Test retry boundaries. A database-transaction retry must not repeat an irreversible payment, and message redelivery must not consume the same approval twice. Establish a stable business identifier before the external effect and reconcile an unknown result.

Work Through a Procurement Example

Consider a fictional purchase request for 900,000 rubles. A manager and finance approve version 3. The initiator changes the payee through the API, creating version 4, but the execution endpoint checks only that two old approval rows exist. No account is compromised, yet an unapproved object executes.

The fix binds each decision to the version and digest of material fields. An edit creates a new version and revokes dependent decisions. A concurrency test starts edit and execution together: one wins, the other receives a conflict, and the external payment is not created twice. This scenario fits an API penetration test.

Retesting varies the amount around a threshold, reverses approver order, expires delegation before execution, and changes the same field through import. This confirms that the control sits at a shared server boundary.

Accept Transitions and Evidence

Request a state diagram, authority matrix, material version fields, delegation rules, transaction boundaries, and a log of tested sequences. Every finding shows the initial state, exact request order, roles, versions, and observed execution.

Some branches may not be available in a test environment. External signatures, background jobs, and production policies that cannot be exercised are explicit limitations. The pentest scope planner helps agree roles, synthetic amounts, and safe external effects. Pentest.red can test transitions and concurrency scenarios; the result applies to the tested versions and cannot guarantee every future process.

PENTEST.RED

Discuss pentest scope and pricing

We start by agreeing on systems, access, constraints and the expected evidence.

Prepare your testing scope

Based on in-depth research, edited for clarity and practical use.

PENTEST.RED / RED JOURNAL