Skip to main content

04 - Legal Documents in a Walled Garden: What the Architecture Describes, What the Client's Legal Counsel Decides

In the EU three instruments govern how documents leave a platform: GDPR Article 20, the Data Act and the contract. With an executable audit.

What do you think about this article?

04 - Legal Documents in a Walled Garden: What the Architecture Describes, What the Client's Legal Counsel Decides
Data Sovereigntyfedericocalo.dev

At a Glance

In the EU three instruments govern how documents leave a platform: GDPR Article 20, the Data Act and the contract. With an executable audit.

Where the case files live and how they come out: three instruments, none covers everything

When the documents of a law firm live inside a proprietary platform, the architectural choice has already been made: in what format they are stored, who can index them and, above all, in what form they come out on the day the firm changes supplier. In the European Union three instruments answer different pieces of the question. The right to data portability in Article 20 of the GDPR concerns personal data provided by a person. Chapter VI of Regulation (EU) 2023/2854, the Data Act, regulates switching between cloud services, including subscription applications. The contract with the supplier decides everything else. None of the three guarantees that the entire case file comes out in an open format, and this article shows where the boundary lies, with the rules open in front of us. It is not legal advice: whether and on what conditions a supplier of yours lets you leave is stated by the contract you signed, read by your lawyer.

This is the last in the series on data sovereignty, and it uses the tools of the previous two: the total cost calculation, which includes exit as an item, and the supplier map as a list of questions. The examples are constructed cases: none describes a real firm and no product is named.

What a walled garden is, and why it is an architectural choice

"Walled garden" denotes a platform that makes it convenient to enter and expensive to leave: the data lives in a format or on an infrastructure that the supplier controls, and moving it elsewhere takes work that the supplier has no interest in making simple. It is not a judgement on the quality of the product, which may offer search, drafting and collaboration that are hard to replicate. It is a description of the shape. Imagine a firm of eight people with 6,000 documents in an archive whose native format is a closed container: as long as the relationship goes well, nobody notices. The problem appears when the supplier changes price or conditions, or when a client asks for a copy of her own data and the firm has to produce it.

Article 20 of the GDPR: the portability of people, not of the firm

Article 20(1) gives the data subject the right to receive the personal data concerning him or her, which he or she has provided to a controller, in a structured, commonly used and machine-readable format, and to transmit those data to another controller. Two conditions apply: the processing is based on consent or on a contract, and it is carried out by automated means. Paragraph 4 adds that the right shall not adversely affect the rights and freedoms of others. Three exclusions matter here: the text speaks of data "provided" by the data subject, so the pleading the lawyer writes, the internal opinion or the correspondence with the opposing party stay outside; it concerns people, not companies; and it does not apply to processing necessary for the performance of a task carried out in the public interest (paragraph 3).

Take client C-17, who asks the firm for her own data. The personal details and the documents she handed over fall under Article 20; the defence brief written by the firm does not. Whoever must answer is the firm, the controller. If the data sits in a platform, the firm depends on the supplier to extract it, and here Article 28 matters: the contract with the processor must provide that the processor assists the controller in responding to requests from data subjects (paragraph 3, point (e)) and that, at the choice of the controller, it deletes or returns all the personal data at the end of the services (point (g)). A supplier that exports only in a closed format puts the firm in the position of being unable to fulfil a request that the law assigns to it.

The Data Act: switching between cloud services

Chapter VI of Regulation (EU) 2023/2854 applies to providers of "data processing services", defined in Article 2, point (8), as digital services that give on-demand network access to a shared pool of configurable, scalable and elastic computing resources. Recital 81 specifies that the delivery models include infrastructure, platform and software as a service. It applies to providers irrespective of their place of establishment when they serve customers in the Union (Article 1(3), point (f)), from 12 September 2025 (Article 50). In Article 25 the Regulation requires the switching contract to contain at least these elements.

  • A mandatory maximum transitional period of 30 calendar days, during which the contract remains applicable and the provider assists the customer and maintains continuity.
  • A maximum notice period for initiating the switching process, not exceeding two months.
  • An exhaustive specification of the categories of data and assets that can be ported, including all exportable data.
  • At least 30 days to retrieve the data after the transitional period, followed by full erasure.
  • Switching charges, which Article 29 limits to directly linked costs until 12 January 2027 and prohibits from that date.

The items are independent, and the criterion that holds them together is that each takes away from the supplier a lever of retention: time, uncertainty about the perimeter, pressure on price. If switching within the 30 days is technically unfeasible, the provider must notify the customer within 14 working days and indicate an alternative period not exceeding seven months (Article 25(4)). For a firm, the most concrete item is the third: the list of exportable categories must be written into the contract, before signing.

The limit is in the definition of "exportable data" (Article 2, point 38): it covers input and output data, metadata included, generated by the customer's use of the service, but excludes assets or data protected by intellectual property rights, or constituting a trade secret, of the provider. If the internal organisation of the documents, the indexes or the classification models belong to the provider, they do not come out. In addition Article 31 provides exemptions: services custom-built for an individual customer and not offered at broad commercial scale, and non-production versions. Whether a subscription legal software falls within the definition and the regime is an assessment of the service and the contract, not of the name of the product.

The United States and professional ethics: what I have not verified

For a firm that serves US clients, portability depends on the contract with the supplier and on the professional rules of the jurisdiction on the ownership and return of the client's file, which vary from one State to another. I have not verified them: the page of the ABA model rules, the US lawyers' association, on the termination of representation could not be reached when I tried to read it (response 403), and I do not write a statement about US law without the text in front of me. For that case the advice remains the one in the previous paragraph: list in the contract what comes out and in which format.

The exit test: an audit you can do before signing

The cheapest proof of portability is to ask for a trial export and look at it. The program below simulates one: it builds, in a temporary folder, six documents and a metadata file with two defects, and then runs the audit. APERTI is the list of formats that I consider readable without the supplier's software; it is a choice of mine, debatable, because for example a .docx is a standard but may contain proprietary features. The audit compares the three sets that matter: the files present, the declared metadata, the open formats. portabili are the files in an open format that also have metadata, because a document with no date or client is an anonymous file, not a case file. At the end it computes the sha256 fingerprint of each file, to compare with the one computed after the transfer to know that nothing changed along the way.

"""Audit of an export from a platform: open formats, metadata and fingerprints. The files are built by the program."""
import hashlib
import json
import tempfile
from pathlib import Path

APERTI = {".pdf", ".docx", ".txt", ".json", ".csv", ".eml", ".xml", ".html", ".odt"}  # declared choice, debatable

DOCUMENTI = {
    "writ_001.pdf": b"%PDF-1.7 atto di citazione",
    "letter_002.docx": b"PK lettera alla controparte",
    "note_003.txt": b"nota interna sul fascicolo",
    "attachment_004.vault": b"VAULT1 allegato in contenitore chiuso",
    "contract_005.pdf": b"%PDF-1.7 contratto di locazione",
    "casefile_006.nxcase": b"NXCASE fascicolo completo",
}
METADATI = [  # the export's metadata file; writ_007.pdf was not exported, note_003.txt has no metadata
    {"file": "writ_001.pdf", "client": "C-17", "date": "2026-03-02"},
    {"file": "letter_002.docx", "client": "C-17", "date": "2026-03-09"},
    {"file": "attachment_004.vault", "client": "C-22", "date": "2026-04-11"},
    {"file": "contract_005.pdf", "client": "C-22", "date": "2026-04-30"},
    {"file": "casefile_006.nxcase", "client": "C-31", "date": "2026-05-18"},
    {"file": "writ_007.pdf", "client": "C-31", "date": "2026-05-20"},
]

with tempfile.TemporaryDirectory() as cartella:
    radice = Path(cartella)
    for nome, contenuto in DOCUMENTI.items():
        (radice / nome).write_bytes(contenuto)
    (radice / "metadata.json").write_text(json.dumps(METADATI), encoding="utf-8")

    presenti = sorted(p.name for p in radice.iterdir() if p.name != "metadata.json")
    dichiarati = {m["file"] for m in json.loads((radice / "metadata.json").read_text(encoding="utf-8"))}

    chiusi = [n for n in presenti if Path(n).suffix.lower() not in APERTI]
    senza_metadati = [n for n in presenti if n not in dichiarati]
    orfani = sorted(dichiarati - set(presenti))
    portabili = [n for n in presenti if n not in chiusi and n not in senza_metadati]

    print(f"files present: {len(presenti)}, metadata declared: {len(dichiarati)}")
    print("not an open format:", ", ".join(chiusi))
    print("without metadata:", ", ".join(senza_metadati))
    print("metadata without a file:", ", ".join(orfani))
    print(f"portable with no work: {len(portabili)} of {len(presenti)} ({len(portabili) / len(presenti):.0%})")
    print("sha256 fingerprints (first 12 digits):")
    for n in presenti:
        print(f"  {n:<22} {hashlib.sha256((radice / n).read_bytes()).hexdigest()[:12]}")

# Output:
# files present: 6, metadata declared: 6
# not an open format: attachment_004.vault, casefile_006.nxcase
# without metadata: note_003.txt
# metadata without a file: writ_007.pdf
# portable with no work: 3 of 6 (50%)
# sha256 fingerprints (first 12 digits):
#   attachment_004.vault   d844308b1e38
#   casefile_006.nxcase    557fc1199729
#   contract_005.pdf       1bd9af870748
#   letter_002.docx        3e322f804da7
#   note_003.txt           cfe81705a8de
#   writ_001.pdf           cacd5f584a51

Of the six files, only three are portable with no work (50%): two are in a non-open format (.vault and .nxcase, closed containers invented for the example), one has no metadata, and there is a metadata entry pointing to a file never exported, writ_007.pdf. That missing file is the most serious defect, because the export does not flag it: you discover it only by crossing the two lists. The fingerprints do not prove that the content is complete, only that it is identical to what came out: an incomplete copy has valid fingerprints.

Where it goes wrong. An open format does not guarantee that the document is usable: a PDF may be a scan without searchable text. And if the supplier offers only a programming interface and not a bulk export, the program has to be applied to a sample downloaded through the interface, not to the whole archive. The test measures the form, not the content, and does not replace reading the list of exportable categories in the contract.

The trade-off of keeping the documents in-house

If the documents sit in an archive in open formats that you control, exit is not a negotiation. In exchange you bring in-house what the supplier used to do for you: search, access control, backup and restore testing, the security of processing required by Article 32 of the GDPR. For a firm of eight people the cost of those hours can be computed with the program of the TCO framework, and restoring is covered in the article on disaster recovery. It is not an argument in favour of one choice: for firms with nobody to run a system, the managed service may remain the right answer, and the seven scenarios in which it is the better choice are in this article.

Frequently asked questions

Does the GDPR right to portability let me leave with the whole case file?

No. Article 20 concerns personal data provided by the data subject, processed by automated means on the basis of consent or of a contract. The lawyer's work, the correspondence with opposing parties and the procedural documents are not "provided by the data subject", and the right belongs to people, not to firms.

Does the Data Act apply to a subscription legal software?

It may: recital 81 cites software as a service among the delivery models of data processing services. Whether that product falls within the definition of Article 2, point 8, and not within the exemptions of Article 31, is decided by a reading of the service and the contract, which is for your lawyer.

How long does the supplier have to let me leave?

For the services covered by Chapter VI the contract must provide a mandatory maximum transitional period of 30 calendar days after a notice period not exceeding two months, extendable up to seven months if switching is technically unfeasible within the 30 days (Article 25). The Regulation applies from 12 September 2025 (Article 50).

Is a PDF export enough?

It depends on what you need afterwards. A PDF is an open format, but if the export does not contain the metadata (client, date, link to the matter) the documents lose their context. Always check that files and metadata correspond, as the program in this article does.

What you can do now

You can tell apart the three instruments with which a European organisation leaves a cloud service: Article 20 of the GDPR for data provided by people, Chapter VI of the Data Act for data processing services, the contract for everything else. You know what switching contracts must contain, that exportable data exclude what is a trade secret of the provider, and that on 12 January 2027 switching charges disappear. You can run a trial export and measure it with a program, before signing. For cases with US clients or suppliers, reading the professional rules is work for your lawyer, which this article has not done.

To read the geopolitical events that touch the choice of a supplier there is the article on the three channels of a geopolitical event.

Sources

The program was run with Python 3.14.4 (python3 -I), twice, with identical output; the files are built by the program in a temporary folder and the ".vault" and ".nxcase" formats are invented. The byte contents of the test files are left in Italian (for example "atto di citazione", a writ of summons), so the fingerprints are the same as in the Italian article. Not verified: US law and the ethics rules (the ABA page could not be reached, response 403).

Commenti

Caricamento commenti...

Sign in to comment

New articles and tools on Telegram too

The Telegram channel flags the site's new articles and tools.

Did you like this article?

Explore other content on the blog or discover my projects