HSCP-R-008 · recipe · Security
Delete a client's data at the end of use, and verify it in the database
Written entry, version 0.2, checked on 2026-11-29.
At a glance
| Implements | HSCP-G-001 Manage the data lifecycle soberly |
|---|---|
| Case | Instantiates: applies an existing practice to a context. |
| Context | health software operated for several customers (facilities, practices), one of which stops using a service or ends its contract |
| Verification | open test · review |
Also serves: HSCP-G-004 Govern third parties that receive data or run code
Implements HSCP-G-001, Manage the data lifecycle soberly, and HSCP-G-004, Govern third parties that receive data or run code. Case: instantiates two generic practices in the health context. The recipe reads from both sides: the vendor who deletes, and the client who asks its vendor for evidence.
When
A client stops a service, changes software or closes a site. The contract provides for return and deletion, but nothing is triggered in the product: the account is deactivated, the data remain in the database, in the backups and at third parties.
Public example, November 2026. A radiology software vendor announces a malicious act on its product. A hospital states that patients treated up to the date on which it had stopped using the service, seven months earlier, are affected (vendor's statement, 08/11/2026; FrenchBreaches, 13/11/2026). Neither the cause nor the retention rules are published: the case raises the question, it does not establish a failure to delete.
How
- Define end of use as a product event, with a date: termination, shutdown of a module, last access beyond an agreed threshold.
- Write down, per data category, what happens at this event: return to the client, mandatory retention and its duration, deletion.
- Map the locations: database, files, search indexes, caches, logs, analytics warehouse, pre-production, backups, and each third party in the register (HSCP-R-006).
- Return before deleting, in a format readable by the client, and obtain its acknowledgement of receipt.
- Delete through a product job, replayable, that runs through the map of locations. No script run by hand.
- Deal with the backups: wait for them to expire and write this down, or purge them if the delay exceeds what the contract allows, or make them unreadable by destroying the client's key (variant below).
- Ask each third party for deletion and its certificate.
- Verify in the database: a query counts, per location, the records attached to the client. The expected result is zero, apart from the listed mandatory retention.
- Give the client a dated report: what was returned, deleted, retained and why, and the expiry date of the backups.
- Close access: the client's accounts, internet-facing portals specific to it, keys and sharing links.
Variant: erase by destroying the client's key
Destroying the key that encrypts a client's data makes every copy encrypted by it unreadable, backups included, without going through them one by one. The method assumes that the client has its own keys: destroying a key shared by the whole service has no effect for a single client.
Minimum proof: two evidence items.
- The map of the client's keys. Each key, each place where it is held (key manager, escrow, replicas, test environments), and the data it encrypts, backups included. It is kept in the map of locations of step 3, with a column "encrypted by a key of the client: yes or no". Points often forgotten: backups encrypted by the backup tool's key, search indexes, vectors of an AI engine, analytics warehouse, pre-production, logs. Each "no" is deleted by the run of step 5.
- The key log. It dates the destruction of each key in the map, copies included, at the end of the key manager's grace period.
Reinforcement, for the most sensitive data: restore a backup taken before the destruction and observe that it can no longer be decrypted. The test needs a restore environment and operating time: it is not required at every end of contract.
Data model
| Field | Content |
|---|---|
client |
identifier of the client in the product |
fin_usage |
date and nature of the event |
emplacement |
database, files, index, cache, log, backup, third party |
chiffre_cle_client |
yes or no: the location is encrypted by a key specific to the client |
sort |
returned, deleted, erased by key destruction, retained (with the legal basis and the deadline) |
fait_le |
date of execution |
compte_restant |
result of the verification query |
cle |
identifier of the key, places where it is held, destruction date, reference of the key log entry |
attestation |
reference of the third party's certificate, if there is one |
Verification
- Automated test: on a test dataset, create a client, trigger end of use, then check that the count query returns zero in each location and that the other clients' data are intact.
- Document review: each end of use in the year has its report and its third-party certificates, and, for the variant, its map of keys and the key log entries.
- Restore test (reinforcement): for the most sensitive data, restore a backup taken before the destruction and check that the client's data can no longer be decrypted, and that the other clients' data still can.
- Periodic check: a query lists the clients inactive for longer than the threshold that still have data.
Evidence produced
The end-of-use report, the dated result of the verification query, the third-party certificates, the acknowledgement of receipt of the return. For the variant: the map of keys and the key log, plus, if the test was done, its report.
Evidence items
Each item attests the recipe at a given date. Frequency given for a product in service.
- Written record End-of-use record
- Export or query result Dated result of the verification query, zero in every location
- Certificate or third-party document Deletion certificates from third parties
- Certificate or third-party document Acknowledgement of receipt of the returned data
- Register Map of the client's keys: each key, each place where it is held, copies of the key and data encrypted by it included
- Log extract Key log, dating the destruction of each key
Own mappings
In addition to those of the practices:
| Identifier | What the recipe adds |
|---|---|
rgpd_2016_679/art28-p3 |
implements in the product the fate of the data provided for at the end of the service |
hds_certification_v2.0/EXI.27 |
gives the order of operations: return, then destruction of copies |
rgpd_2016_679/art25-p2 |
links deletion to the retention period limited by default |
secnumcloud_v3.2/19.4.a |
accepts erasing the encryption keys of the client's storage spaces as an erasure method at the end of the contract, with twenty-one days' notice |
secnumcloud_v3.2/11.9.a |
accepts secure erasure of the key when the storage space is encrypted |
Versions
| Version | Status | Date |
|---|---|---|
| 0.2 | Draft | 2026-11-29 |
| 0.1 | Draft | 2026-11-20 |
How to cite: “Health Software Common Practices”, HSCP-R-008, version 0.2, https://healthtechpractices.org/en/recettes/hscp-r-008/, under the CC BY-NC-SA 4.0 licence. Licence