Written Authorization, Contracts and Insurance
The authorization lesson of Security Foundations established the principle: written permission, from someone entitled to give it, for a defined scope. A commercial engagement wraps that permission in a small stack of documents, each with its own job, and the gaps between them are where real disputes come from. A tester crashes a server and the contract caps liability at the fee, but the client's cloud provider was never asked. A tester finds personal data and nobody agreed who may hold it. This lesson walks through the stack and builds a "ready to start?" check that refuses to let testing begin while something is missing.
This is not legal advice: contracts and liability rules differ by country, and a lawyer should review your templates. The law lessons explain why the paperwork matters.
The document stack
| Document | Signed by | Its job |
|---|---|---|
| Master services agreement (MSA) | both companies, once | the general terms: liability, indemnities, confidentiality, payment, governing law |
| Statement of work (SOW) | both, per engagement | the service type, the question it answers, deliverables, dates, price, the retest |
| Non-disclosure agreement (NDA) | both, often before scoping | protects what the client tells the tester and what the tester finds |
| Authorization to test | someone with authority over the systems | the permission itself: systems, dates, testers, techniques; the document that separates a test from a crime |
| Rules of engagement | both project leads | how the test runs: the next lesson |
| Third-party consents | hosting, cloud, SaaS or managed-service providers when their terms require it | permission for systems the client uses but doesn't own |
| Data processing agreement (DPA) | both, where personal data may be seen | under the GDPR and similar laws the tester processes personal data for the client and must be bound to the client's purpose |
In small engagements several of these are one document. What matters is that each job is done by some signed text before the first packet.
Who may sign the authorization
The signer must control the systems: an officer of the company, or someone with delegated authority in writing (a CISO with a signed delegation, for instance). Warning signs: the signer is a developer or a project manager, the systems belong to a subsidiary or a parent company, or the client "manages" systems on behalf of its own customers. For physical or social-engineering work, testers also carry a short signed letter naming a 24-hour contact who can confirm the engagement if security staff or police stop them.
Third parties
Most clients run on someone else's infrastructure. Each provider's published policy decides what the client's tester may do: the large cloud providers allow customers to test their own resources for many services without asking first, but forbid denial-of-service testing and attacks on the provider's shared infrastructure, and the details change. A SaaS application the client merely uses (its CRM, its email provider) is usually out of reach unless the vendor runs a programme that allows it. Write down, per third-party asset, which policy applies and when you read it.
Liability and insurance
- Limitation of liability: the MSA usually caps the tester's liability (often at the fees paid) and excludes indirect losses. The client accepts some risk of disruption in exchange for the test; the RoE then reduces that risk.
- Indemnities: the client indemnifies the tester against third-party claims arising from the client's authorised scope (for example, if the client listed an address it didn't own). This is why the scope must come from the client in writing.
- Insurance: testing firms carry professional indemnity (errors and omissions) insurance and often cyber liability cover; clients and public-sector buyers commonly ask for proof and a minimum amount. Insurers may exclude certain activities (social engineering, physical entry) unless declared.
- Governing law and location: name the law that governs the contract, and remember that the criminal law of where the systems are and where the tester is both apply. A test from Vietnam of servers in Germany for a UK client touches three legal systems.
A ready-to-start check
Engagement teams keep the stack as structured data in their project tracker. The check below refuses to start while any blocker is open. The engagement is fictional; the third-party CDN uses a documentation address.
from datetime import date
engagement = {
"client": "Lab Retail Ltd",
"documents": {"msa": True, "sow": True, "nda": True, "authorization": True, "roe": False, "dpa": False},
"signer": {"name": "R. Tran", "role": "Head of Engineering", "delegation_on_file": False},
"start": date(2026, 12, 1), "end": date(2026, 12, 12), "signed_on": date(2026, 11, 20),
"personal_data_possible": True,
"third_party_assets": [
{"asset": "cdn.lab.test (203.0.113.50)", "provider": "CDN provider", "policy_read": None},
{"asset": "shop VMs in cloud tenant", "provider": "cloud provider", "policy_read": date(2026, 11, 18)},
],
"insurance_certificate": True,
}
AUTHORISED_ROLES = {"CEO", "CTO", "CIO", "CISO", "Managing Director"}
def blockers(e):
out = []
for doc, ok in e["documents"].items():
if not ok and doc != "dpa":
out.append(f"missing document: {doc}")
if e["personal_data_possible"] and not e["documents"]["dpa"]:
out.append("personal data may be seen but no data processing agreement")
s = e["signer"]
if s["role"] not in AUTHORISED_ROLES and not s["delegation_on_file"]:
out.append(f"signer {s['name']} ({s['role']}): no authority on file, get a written delegation")
if not e["signed_on"] < e["start"] <= e["end"]:
out.append("dates: authorization must be signed before the start, start before the end")
for t in e["third_party_assets"]:
if t["policy_read"] is None:
out.append(f"third party: {t['asset']} - read and record the {t['provider']}'s testing policy, or exclude it")
if not e["insurance_certificate"]:
out.append("no insurance certificate on file")
return out
problems = blockers(engagement)
print(f"{engagement['client']}: {len(problems)} blocker(s)")
for p in problems:
print(" -", p)
print("READY TO START" if not problems else "DO NOT START")Lab Retail Ltd: 4 blocker(s)
- missing document: roe
- personal data may be seen but no data processing agreement
- signer R. Tran (Head of Engineering): no authority on file, get a written delegation
- third party: cdn.lab.test (203.0.113.50) - read and record the CDN provider's testing policy, or exclude it
DO NOT START
Each blocker is a real dispute waiting to happen. The rules of engagement are still unsigned. Personal data may be seen without a DPA. The head of engineering is senior, but nobody has shown that they may authorise attacks on the company's systems. The CDN in front of the shop belongs to another company whose policy nobody has read. None of these is a technical problem, and every one of them can stop an engagement, or end a career, after the fact.
How gaps are noticed
- Before the test: a kick-off meeting reads the scope and RoE aloud with the client's technical contact, who usually spots the address that "actually belongs to the hosting company".
- During the test: a provider's abuse desk or a third party's SOC reports traffic; the activity log and the signed documents are what you show them.
- After the test: an incident (an outage, a data leak) triggers a contract review. Missing documents are found then, which is too late.
How it is prevented
Use templates reviewed by a lawyer, a checklist like the one above that blocks the start date in the project tool, and a rule that testers never accept scope changes by chat or phone: every change is a signed amendment, even if it is one line.
Pitfalls
- "The client said it's fine" on a call. Scope expansions agreed verbally are the classic source of disputes. Get it in writing.
- Expired authorization. Engagements slip. If testing moves to January, the December authorization does not cover it.
- Testing a client's customer. A managed-service provider can't authorise tests of the systems it manages for others without their consent.
- Contracts that forget the retest. Without it in the SOW, the retest becomes a new negotiation and often never happens.
Practice
- Fix the engagement record so that
blockers()returns nothing. Which changes are paperwork, and which change the scope? - A client wants you to test its office Wi-Fi from the car park. Which documents in the stack need special content?
Answers
- Paperwork: sign the RoE, sign a DPA, file the signer's written delegation (or get a signature from the CISO or CTO). Scope: either read and record the CDN provider's policy (and follow it) or remove
cdn.lab.testfrom scope; that second option changes what is tested and goes into the limitations section. - The authorization must name the location, dates and times, the wireless networks (SSIDs and the access points' owner), and say whether neighbouring networks are excluded (they are, always). Carry the physical letter with the 24-hour contact. Check that the insurance covers on-site work.
Test yourself
Which document is the actual permission to test, the one that separates testing from a crime?
- The NDA
- The authorization to test, signed by someone with authority over the systems
- The invoice
- The MSA's payment terms
Your client's website runs behind a CDN owned by another company. What decides whether you may test the CDN's addresses?
- Your client's authorization alone
- The CDN provider's own testing policy or consent
- Nothing, CDNs are public
- The OWASP WSTG
Why should the scope list come from the client in writing?
- It is shorter
- The client indemnifies the tester for its authorised scope; a scope typed by the tester shifts the risk of a wrong address to the tester
- Scanners need it
- Insurance companies require handwriting
An engagement moves from December to January. What must happen?
- Nothing
- The authorization and RoE dates must be amended in writing before testing in January
- Test at night instead
- Ask the client by phone