Deleting a patient portal profile does not necessarily remove every machine credential that previously accessed it. In a fictional healthcare platform, a background integration continues requesting a deleted evaluation patient’s clinical record. The key question is whether the old token can still retrieve data or whether an expected cleanup job is merely producing denied requests. Investigators must distinguish the creation of an access request from successful disclosure while avoiding unnecessary interference with active patient care.
Follow the identifier across deletion boundaries
The portal maintains a patient account, a consent or delegation record, a service-to-service grant and a cache used by an integration partner. The evaluation account is deleted in the front-end system, yet a token minted beforehand is still accepted by one API route. Several states are possible: deletion may remove login capability while preserving records under a retention obligation; the API may still expose the retained record to a partner; or the API may reject each call while monitoring labels it as a successful network connection.
Build a timeline using the deletion request, identity-provider deactivation, revocation event, integration job execution, cache expiry and API response. Note which system owns the authoritative patient identifier and whether an internal record number is reused. An account marked ‘deleted’ in a portal screenshot cannot establish that downstream application authorisation has changed. Confirm the token audience, resource scope, issuing authority and intended permitted purpose without copying a bearer token into general ticket notes.
Separate activity from accessible information
Inspect server-side API decision logs for patient identifier, calling workload, token fingerprint, requested operation, result and correlation ID. Where logs include only transport status, use application instrumentation or controlled replay in a test environment to establish whether a success response contained clinical data, an empty result, or a redirect. Avoid replaying real patient tokens against production endpoints. Compare integration audit records, job outputs and any encrypted staging exports with the clinic’s data-retention rules.
A token used after deletion is not automatically malicious. The integration might be trying to remove its own cached record, reconcile a billing reference or complete an approved preservation workflow. Ask the clinical system owner and privacy officer to establish which actions remain lawful and clinically necessary. If the service returned records to an unauthorised partner, document the exact data classes and recipients. If all requests were denied, record the revocation gap or telemetry ambiguity accurately without inventing a patient breach.
Containment must respect care pathways
Before disabling a shared integration, identify whether it also delivers laboratory results, referral notices or urgent care coordination. The application owner can often deny the specific deleted patient’s resource, invalidate the affected delegation or revoke a narrowly scoped workload grant while keeping other patients’ workflows available. If the integration uses a broadly shared credential, plan a short replacement window with the provider and clinical operations lead. Security ownership does not confer authority to stop patient-critical message delivery unilaterally.
Preserve relevant logs and access decisions under restricted clinical confidentiality. Rotation should include independent API sessions, queued jobs and signed export links; a portal password reset will not necessarily revoke those objects. Tell downstream recipients to preserve evidence and pause further use of a suspect extract while lawful retention questions are resolved. Emergency access needs a documented authorised exception with monitoring, not a silent broad token reinstatement.
Reproduce the lifecycle defect safely
Use invented patient profiles P1 and P2 and a synthetic integration tenant. First show that a granted token can read P1 while P1 is active and consent permits it. Delete P1’s portal account or withdraw the relevant grant in the test environment. Retry the original token at the direct record endpoint, list endpoint and background export route. All operations outside a documented retention-only exception should be refused at the resource layer. A response containing a tombstone or permitted status metadata must be distinguished from one disclosing clinical content.
Next attempt P2’s record with the P1 grant. It must also be denied, proving that the token is not a wildcard capability. Where cached worker tokens are used, repeat the negative test before their natural expiry; otherwise a team may mistake token timeout for correct revocation. Include a deliberate positive case for the approved clinical retention role so privacy controls are not tested by simply breaking all record access.
Every check needs expected result, actual result, event ID, owner and retest date. The acceptance statement should say ‘the post-deletion token could not retrieve P1 data through tested paths’ rather than ‘all copies are permanently removed’. The latter requires a separate data-lifecycle and retention review.
Escalation and permanent correction
Notify clinical governance if care delivery was delayed, and privacy/legal specialists if there is evidence of unauthorised personal-information access. Do not equate stale-credential capability with confirmed disclosure. The engineering fix should link authorisation to live delegation and subject state, invalidate relevant caches when access is withdrawn, and provide observable audit entries for revoked tokens. Data-retention requirements should be implemented as separate controlled permissions, not as an excuse to leave ordinary integration access live.
Add this case to integration onboarding and offboarding tests. Require a named owner to prove negative access after account deletion, consent withdrawal and vendor termination. When the same task is repeated next quarter, a denied API transaction and a preserved patient-safety pathway are stronger evidence than a screenshot of a disabled portal account.
Sources and context
- ASD Essential Eight: https://www.cyber.gov.au/resources-business-and-government/essential-cyber-security/essential-eight
- NIST Cybersecurity Framework 2.0: https://www.nist.gov/cyberframework
How Next Defence can assist
For health and aged-care, Next Defence can scope the specific cloud access and data handling problem in this example: A health platform deletes an evaluation patient's portal account but a background integration keeps querying it. An engagement could translate the intended safeguard—invalidate related application sessions and audit derivative cache retention—into an owner-approved work plan and a reproducible check to delete a fictional account and test direct API access and cache lookup separately. Any assessment would be limited to the agreed systems and would respect the operational constraint: Health record deletion and retention obligations require legal and clinical review.