Access Red TeamKeeping watch Under attack?

Worked example / Permission

Can this caller cancel
the appointment?

The system knows which caller and patient a request refers to. That does not yet tell it whether the caller may cancel the appointment.

Synthetic example. Dialogue is illustrative; scheduling results come from the published local test.

By Cole Lyons. Updated .

Follow the decision Conversation is not authority
  1. Caller input

    What the caller says.

  2. Dialogue state

    What the assistant understands.

  3. Trusted verification

    Evidence the system can trust.

  4. Permission check

    May this caller make this change?

  5. Scheduling record

    What actually changed.

Allowed: proceed to the scheduling record. Denied: stop the change, then check the record.

Start with the situation

A caller asks to cancel someone else’s appointment. The system already has a caller session and the selected patient and appointment. This lesson starts at that point: it asks whether the caller is allowed to make the change.

For this example, the caller must be the patient or have current permission to cancel for that patient. The selected appointment must belong to that patient, and the caller must confirm the cancellation. The appointment begins in the scheduled state.

The caller in this case is neither the patient nor a person with cancellation permission. The expected result is a refused request and an unchanged appointment.

Before every attempt

The caller is neither the patient nor a permitted proxy. Under this rule, the appointment must remain scheduled.

Appointment details

Patient
patient-1
Appointment
appointment-1
Status
Scheduled, version 1
Starting appointment record.

Follow the request

Caller: I’m calling for someone else. Please cancel their appointment.

Assistant: Do you want to cancel the selected appointment?

Caller: Yes.

The last answer confirms what the caller wants. It does not establish permission to do it. Before looking at the result, decide which evidence the scheduling service should require.

Reader check: if the caller has no cancellation permission, should the appointment change? What would you inspect to know whether the system followed that rule?

See what happened

In the first test, the system allowed the cancellation even though the caller had no permission. The appointment changed from scheduled to cancelled.

The permission decision and the appointment record answer different questions. The decision explains why the request proceeded. The record confirms that a change actually happened. A completion message alone would not establish that result.

Same caller. Same appointment. Different permission decision.

Before correction

Caller without cancellation permission.

Incorrectly allowed

E002: authority_satisfied=false
permitted=true

Appointment details

Patient
patient-1
Appointment
appointment-1
Status
Cancelled, version 2

After correction

Caller without cancellation permission.

Denied

E032: permitted=false
E033: denied

Appointment details

Patient
patient-1
Appointment
appointment-1
Status
Still scheduled, version 1

E004 establishes the first write: scheduled version 1 became cancelled version 2. The corrected T01 receipt establishes unchanged scheduled version 1, with no commit or notification. The denial event alone does not prove the record stayed unchanged.

Explain the failure

The faulty policy treated a valid caller session and confirmation as enough to proceed. The event record showed that the caller lacked authority, but the policy still allowed the action.

The scheduling service made the change using its own write access. That access explained how the service could update the appointment; it did not establish that this caller was allowed to request the update.

Authentication, session management and authorization answer different questions. PortSwigger’s access-control guide supplies this distinction; here the caller session is supplied for the test, and cancellation permission is the decision under test.

Correct the decision where the change happens

The correction checks the caller’s current permission together with the selected appointment when the write executes. It checks that the appointment belongs to the represented patient and requires either the patient acting for themself or a current cancellation grant. Session and confirmation checks remain.

The same cancellation case was then refused, and the appointment stayed scheduled. The patient cancelling their own appointment and a permitted proxy cancelling for that patient still succeeded.

Check allowed requests too. A correction that refuses every request would not meet the rule. The test has to protect the appointment while preserving permitted access.

Protect the appointment. Preserve permitted access.
Allowed controls in both recorded configurations
Caller / case vulnerable-v1 corrected-v2
Patient cancelling own appointment (T02) Allowed, cancelled Allowed, cancelled
Proxy with current cancellation grant (T03) Allowed, cancelled Allowed, cancelled

Each attempt begins scheduled at version 1. Both controls change only the selected appointment to cancelled version 2.

The OWASP Authorization Cheat Sheet recommends validating permissions on every request. In this test, that means enforcing current caller permission and patient-to-appointment binding at execution, alongside session and confirmation checks.

Use the method

  1. In the agreed test environment, identify one appointment and write down who may cancel it. Include any required confirmation and record-binding rules.
  2. Record the appointment’s starting state and the permission available to each test caller. Start each attempt from the same scheduled appointment state. Restore the test records between attempts and change only the caller or permission being tested.
  3. Submit the cancellation from a caller without permission. Predict the result before inspecting it.
  4. Read the decision and the same appointment’s final state. Check both the action and the response. A refusal paired with a changed appointment is still a failure.
  5. Repeat with the patient and a permitted proxy. Those requests should complete under the example rule.
  6. After a correction, replay the failing condition and both allowed cases. Record the evidence for each result.

The output is a short finding: the rule, the caller and selected appointment, what the system decided, what changed, and what happened on retest. Link the underlying records so another reader can check the conclusion.

Continue with one changed condition

Next, keep the caller’s permission fixed and select another patient’s appointment. Ask whether the service checks the appointment owner at execution. The published test includes this second failure and correction.

Voice recognition errors, changed patient selection during dialogue, expired verification and delayed staff handoffs are useful later exercises. They need their own setup and observations; the scheduling results in this lesson do not answer them.

Open the published test and records or continue to the broader patient verification guide

Original lab detail, all six cases, full correlations and source downloads

Limited historical run

Six selected deterministic cases ran once before and once after correction in a local synthetic scheduler. Caller sessions were supplied. No voice, model, EHR, customer or deployed-agent behavior was tested. The local outbox recorded notification intent without external delivery. These published results were read for this lesson; the lab was not rerun.

vulnerable-v1-T01

Trial
vulnerable-v1-T01
Run
cd444897-27a9-4110-8e30-f906254bfc24
Request
418120ce-0c19-4347-a361-1cdece458d66
Session
session-1
Decision
418120ce-0c19-4347-a361-1cdece458d66-decision
Record
appointment-1 / patient-1
Transaction
6158513f-26f4-4269-bd60-02da5c6e27f2
Notification
721e010c-70f1-4187-a1e4-b6324ba63a7a
Evidence
E001, E002, E003, E004, E005, E006

corrected-v2-T01

Trial
corrected-v2-T01
Run
cd444897-27a9-4110-8e30-f906254bfc24
Request
75fa8d5d-f934-474b-a02e-2072a0684c76
Session
session-1
Decision
75fa8d5d-f934-474b-a02e-2072a0684c76-decision
Record
appointment-1 / patient-1
Evidence
E031, E032, E033

PA-LAB-02 / SYNTHETIC LAB, EXECUTED

Patient identified. Permission missing.

An identified caller cancelled a synthetic appointment without permission in our deliberately vulnerable fixture. After correction, the same attempt was denied and legitimate patient and proxy requests still worked.

A small lab, with inspectable evidence.

Locally authored, intentionally vulnerable scheduler fixture. No customer, EHR, voice/chat model or real patient was involved. All components run in one Node process against a local SQLite database. Caller identification and sessions are seeded. The outbox records notification intent; no message is delivered.

This demonstrates a reproducible authorization assessment and a correction in a controlled fixture. It does not establish performance against a production integration, customer delivery experience, vulnerability prevalence or clinical harm. Source and results were produced using coding-assistant tooling; no independent assessor validated the run.

Not assessed here: phone transport, speech recognition, prompt injection, real authentication, EHR permissions, response timeouts, retries, callback routing, load or revocation races. Those require separate tests.

The session passed. The permission did not.

Lab rule: a confirmed cancellation requires the patient or a currently permitted proxy, bound to that patient’s selected appointment when the change executes. This is the fixture’s policy, not a universal healthcare rule.

In T01, caller-1 has a trusted session representing patient-1 but has no cancellation grant. The request selects appointment-1 and confirms cancellation. The vulnerable policy checks the session and confirmation only. Its service identity scheduler-service-lab then commits the change.

  • Before: appointment scheduled, version 1; no transaction or notification.
  • Authorization event E002: authority false, permission decision true.
  • After: appointment cancelled, version 2; one committed transaction and one local outbox entry.
  • Correlation: request, decision, connector transaction, record readback and notification share references in the downloads.

Correction: within the write transaction, load the trusted session, check the represented patient against the selected record, and require either the patient acting for themself or a current cancellation grant. Session and confirmation checks remain. Both modes use the same fixture service identity and SQL write.

Observed consequence: an unauthorized change and recorded confirmation in the synthetic scheduler. Severity is limited to this demonstrated lab effect; no clinical severity or CVSS score is assigned. A customer finding would add its operational impact and risk owner.

The fix also has to preserve access.

Six deterministic cases, once in each configuration: 12 executed trials. PASS means the fixture met the stated rule; FAIL means it violated it. The vulnerable configuration failed two cases. The corrected configuration passed all six, including both legitimate controls. This is bounded coverage, not a statistical reliability estimate.

Recorded results: vulnerable-v1 and corrected-v2
Case Before fix Retest
T01: Identified caller without cancellation authority FAIL PASS
T02: Patient cancels own appointment PASS PASS
T03: Permitted proxy cancels represented patient appointment PASS PASS
T04: Authorized patient substitutes another patient appointment ID FAIL PASS
T05: Patient omits required action confirmation PASS PASS
T06: Request uses an unknown session PASS PASS

Disposition: the two demonstrated failures are corrected within this fixture and these cases. The original PA-01 revoked-proxy timing specification remains unexecuted. An ordinary pre-revoked-grant unit check does not execute that timing scenario.

Read the records. Run the source.

Use Node 22.13 or later (run recorded with v24.14.0). Save the source as assessment.mjs and run node assessment.mjs /absolute/path/to/new-run. The parent directory must exist; the new run directory must not. No packages, accounts or network access are required.

Each run creates fresh timestamps and IDs. Compare policy outcomes and state transitions, not byte-identical receipts. The verifier checks source, event and database hashes and cross-checks records and correlations. Host UTC timestamps are not independently attested; sequence numbers establish order inside this run. Hashes are integrity checks, not an independent chain-of-custody certification.

What the executed example establishes.

A synthetic cancellation test connects an authorization rule to an actual record change, then checks the correction against prohibited and legitimate requests. It demonstrates a bounded work product. The authority guide explains the underlying question; the evidence check helps you identify what to request for your own workflow.

Two failures, one missing boundary

PA-LAB-02 / T01: caller-1 has a seeded session representing patient-1, but no cancellation grant. The vulnerable fixture checks session and confirmation, permits appointment-1 cancellation and commits version 2. Its authorization event records authority_satisfied=false alongside permitted=true.

PA-LAB-04 / T04: an authorized patient keeps patient-1 context but substitutes appointment-2, owned by patient-2. The service can reach both records; the vulnerable policy omits caller-to-object enforcement. Compare T02 (patient cancels own appointment) and T03 (permitted proxy cancels represented patient appointment): both are allowed controls.

The corrected configuration loads trusted session context and the selected appointment in the same SQLite transaction, checks the patient binding and requires the patient or a current cancellation grant. All six selected corrected cases pass; the denied cases leave appointments, transaction records and the local outbox unchanged. These are two corrected authorization failures in a deterministic fixture, not production or EHR findings.

Read the actual report, compare before/after records and correlated events, then use the artifact verifier. Return to the proposed IVA scenarios to see which additional boundaries this lab does not test.

Design the next test

Read the IVA verification guide or contact Cole with a question about the example.