SOC 2, MiFID II and MiCA for engineers: controls, evidence, and audits you can pass twice

A control is a claim plus a mechanism plus evidence. SOC 2 Type II tests whether the mechanism operated over a period, so evidence has to be emitted by the system rather than assembled the week before the audit.

Read the briefing
About 4 min to read 6 drills

What to remember

  1. Claim, mechanism, evidence — all three or it is not a control. 'Only reviewed code reaches production' is the claim; branch protection is the mechanism; the merge record is the evidence.
  2. Type I is a date, Type II is a period. Type II samples months of operation, which is why controls implemented as intentions fail and automated ones pass.
  3. MiFID II's engineering surface is records and clocks. Retention of orders and comms, plus documented clock accuracy — which makes PTP and capture compliance infrastructure.
  4. MiCA is custody and segregation; DORA is the ICT incident clock. For an EU crypto-asset service provider, MiCA sets the client-asset and key-management obligations, and DORA — which applies to CASPs alongside it — sets ICT risk management, resilience testing and major-incident reporting on fixed timelines.
  5. Narrow the scope on purpose. Fewer systems in scope means fewer controls to evidence. Architecture decisions are audit-cost decisions.

The big picture

Compliance frameworks are, from an engineer's side, a demand for controls that demonstrably operate. This topic covers what SOC 2 actually is, how to build controls that pass a second audit as easily as the first, and the specific engineering obligations MiFID II, MiCA and DORA create.

The mental model

An auditor asks three questions about every claim: what stops the bad thing, does it run, and show me. If your answer to the third is a screenshot someone took, the control is fragile. If it is a query against an immutable log, it is durable.

In depth

What SOC 2 is and is not

SOC 2 is an attestation report written by an auditor against the AICPA trust-services criteria (security, and optionally availability, confidentiality, processing integrity and privacy). It is not a certification with a fixed checklist, which is why two companies' SOC 2 reports can describe very different control sets. Type I says the controls were suitably designed at a point in time; Type II says they operated effectively over a period — typically three to twelve months — and the auditor samples evidence across that window.

The engineering consequence is simple and often learned the hard way: evidence must be generated automatically as a by-product of the system working. Screenshot-and-spreadsheet programmes pass a Type I and drown in a Type II.

Building controls that survive a second audit

Write each control as three parts. Claim: "only peer-reviewed code reaches production." Mechanism: branch protection with required review and a pipeline that deploys only from the protected branch. Evidence: the merge record and the deployment record, both queryable. Then ask the failure question: what would an auditor sample that could contradict this? If the answer is "an emergency deploy path nobody logs", fix that before the audit finds it.

Patterns that work: controls as code (policy checks in CI, admission control in the cluster, IaC for configuration), evidence emitted by systems (immutable logs, signed artefacts, ticket links in commits), a named owner per control who can explain it without help, and scope drawn deliberately so that fewer systems carry obligations.

MiFID II: records and clocks

For trading infrastructure, MiFID II turns two engineering concerns into obligations. Record-keeping: order records, communications and transaction reports retained for years in a form that can be produced on request — which means immutable storage, searchable indexing and a retention policy you can prove. Clock synchronisation: timestamp granularity and maximum divergence from UTC are specified by activity type, and you must document how you achieve and monitor it. That is why PTP with hardware timestamping, drift monitoring and line-rate capture are compliance infrastructure rather than performance luxuries.

MiCA and DORA: custody, resilience and reporting

For crypto-asset service providers in the EU, MiCA lands on infrastructure through custody: segregation of client assets from the firm's own, a documented custody and key-management policy, and liability for client assets lost through incidents attributable to you. The operational-resilience half comes from DORA, which applies to CASPs alongside MiCA: ICT risk management, continuity and resilience testing, oversight of ICT third parties, and major-incident reporting on fixed clocks — an initial notification within four hours of classifying an incident as major (and within 24 hours of becoming aware of it), an intermediate report within 72 hours, and a final report within a month. Mapping an architecture to both while it is being designed is dramatically cheaper than retrofitting after a term sheet — and it is the same work as good custody design and a rehearsed compromise playbook, which is the point worth making to a sceptical engineering team.

Myths and facts

Myth: SOC 2 is a certification you either have or do not.

Fact: It is an auditor's report on your own described controls; the scope and the control set are yours, which is why reading the report matters more than seeing the badge.

Myth: We can gather the evidence when the audit starts.

Fact: Type II samples the whole period. Evidence that did not exist at the time cannot be created afterwards.

Myth: Compliance is separate from engineering quality.

Fact: Nearly every control is something you would want anyway — review, least privilege, immutable audit, tested recovery. The difference is having to prove it.

Myth: Clock sync is an operational nicety.

Fact: Under MiFID II it is a documented obligation with specified accuracy, which makes drift a compliance incident.

Myth: Wider scope shows more maturity.

Fact: Wider scope means more systems to evidence. Deliberate scoping is a legitimate and cheap control.

How pros do it

  • Express every control as claim + mechanism + evidence, with a named owner who can explain it.
  • Automate evidence: immutable logs, signed artefacts, merge and deploy records, ticket linkage.
  • Implement controls as code — CI policy, admission control, IaC — so drift is a build failure, not an audit finding.
  • Draw scope deliberately; keep regulated workloads on a small, well-understood surface.
  • For trading, treat clock accuracy and capture retention as monitored controls with alerts.

Questions people ask

Type I or Type II first?

Type I first, then Type II — but start the Type II window only once evidence is being emitted automatically. Type I validates the control design and satisfies a customer quickly; Type II samples months of operation, and evidence that did not exist at the time cannot be created later. The caveat: a passed Type I is not readiness, and treating it as such is how the first Type II window fills with findings.

How much evidence is enough?

Enough that any sampled date in the period is answered by a query, not a search. The auditor picks dates and asks who had access, what was deployed, who approved it; if the system emitted structured records at the time, that is a query. If a human has to reconstruct it from chat history and screenshots, it is not enough.

What do MiCA and DORA actually require from infrastructure?

Custody and segregation from MiCA; resilience and incident clocks from DORA. MiCA wants client assets segregated from the firm's own, a documented custody and key-management policy, and makes you liable for assets lost to incidents attributable to you; DORA wants ICT risk management, tested continuity, and major incidents reported on fixed timelines. The caveat is that nearly all of it is the custody and playbook work you would do anyway — the delta is the evidence.

What breaks most often between audits?

Emergency paths and scope creep. Break-glass deploys that bypass the mechanism contradict a universal claim, and a new system quietly handling regulated data arrives without the control set. The fix for both is structural: route break-glass through the pipeline with a logged reason and post-hoc review, and gate new in-scope systems on the controls with admission policy rather than memory.

Who owns compliance in engineering?

One named engineering owner per control. The owner can explain the mechanism without the auditor's help and notices when it drifts, which is what makes the second audit cheaper than the first. A programme owned only by a compliance function produces controls nobody can explain.

Does an enclave-based design help with audits?

Yes, if you can evidence it. Attestation-gated key release plus immutable audit of key use is unusually strong evidence for confidentiality claims about key handling, because the refusal is enforced by a policy the auditor can read. It does not help with the rest of the control set — access, change, logging still need their own evidence.

Further reading

Drills · 6

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Pick the strongest answer

Walk me through SOC 2 for infrastructure. Give me a concrete control an auditor could actually test in a Type II — which of these is one?

  1. A policy document stating that all code must be reviewed. A claim with no mechanism; the auditor will sample deploys and find the exceptions.
  2. A screenshot of the repository settings taken during the audit. It evidences one moment, not the period Type II covers.
  3. A quarterly training session on secure coding. Useful, but it does not prevent an unreviewed deploy.
  4. Branch protection requiring one approving review on the deploy branch, with the pipeline deploying only from that branch — evidenced by merge and deployment records for the whole period. A mechanism that runs plus evidence that persists across the sample window.
In short

Branch protection with a required review, plus a pipeline deploying only from that branch, with merge and deploy records for the whole period.

Why

The formula is claim plus mechanism plus evidence, and Type II tests the middle one over months. This is why compliance work and platform work converge: the same paved path that makes deploys safe makes them evidenceable.

The common mistake

Offering a policy document or a training session as a control. A claim with no enforcing mechanism is exactly what the auditor's sample will contradict.

Read the docs

2 Answer out loud

You would own our first SOC 2 Type II. We are a crypto custodian in the EU, so MiCA and DORA are in scope too. How would you run it without it eating the engineering team, and what would you build first? Five to seven sentences.

In short

A strong answer narrows the scope first, then builds controls as code, and lets the system produce the evidence by itself.

What a strong answer does
  • approach: Deliberate scoping first, controls as code with automated evidence, named owners, and the audit as a by-product of the platform rather than a project alongside it.
  • sequencing: Scope, then the highest-leverage automated controls (access, change, audit logging), then Type I to validate design, then the Type II window — with MiCA custody obligations and DORA's ICT-risk ones mapped in the same control register.
  • engineering fit: Each control is something the team wanted anyway — paved path, least privilege, immutable audit, tested recovery — with evidence emitted by the system.
  • honesty: Names what will actually hurt (emergency paths, scope creep, evidence gaps in the early window) and how it is handled.
Why

Strong answers treat scope as a control, build evidence automation before the window opens, and note that most controls are wanted anyway.

The common mistake

Starting the Type II window before the evidence is being emitted. Evidence that did not exist at the time cannot be created afterwards, so the first months of the window become findings.

Read the docs

3 Quick recall

Quick one: what does a SOC 2 Type II test that a Type I does not?

In short

Type II checks the controls in operation over a period of months, not just their design on one date.

Accepted

that the controls operated over a period · operating effectiveness over time · controls working over a window

Why

Type I attests to control design at a point in time; Type II tests that the controls operated effectively across a period, sampling evidence from throughout it.

4 Pick the strongest answer

You said MiFID II shaped your infrastructure. Why would a regulation care about your clocks and your packet capture?

  1. Because packet capture is the only way to reconstruct a trade. It is the strongest evidence, but the obligation is about records and clocks, not the mechanism.
  2. It specifies timestamp granularity and maximum divergence from UTC by activity, and requires order and communication records to be retained and producible — so documented, monitored clock accuracy and durable capture become obligations. The regulation turns timing accuracy and record retention into evidenced controls.
  3. Because low latency is required by regulation. Latency is a commercial concern; timestamp accuracy and records are the regulatory ones.
  4. It does not; MiFID II is purely a reporting regime. Reporting rests on records and timestamps, which are engineering obligations.
In short

MiFID II sets rules for clock accuracy and record keeping, so clock sync and packet capture become obligations, not extras.

Why

Once accuracy is an obligation, clock drift becomes a compliance incident with a monitoring requirement — which is why offset, path delay and servo state end up on a dashboard with alerts rather than being checked when someone remembers.

Read the docs

5 Scenario: what do you do next?

Six weeks into your Type II observation window, an auditor's interim sample asks for evidence that every production deploy in the last month was reviewed. Two deploys came from a break-glass path with no review and no central record.

Step 1. What do you do?

  1. Pause the audit and restart the window later. Sometimes an option, but usually unnecessary and it delays the customers waiting on the report.
  2. Retro-create review records so the sample passes. That is falsifying evidence — a career and company-ending choice, not a compliance shortcut.
  3. Disclose both promptly with the facts, reconstruct what evidence exists (who, what, why, and any post-hoc review), and fix the mechanism now so the remainder of the window is clean — auditors respond far better to a disclosed and remediated gap than to one they find. Honesty plus remediation inside the window is the outcome that keeps the report clean; concealment is a different category of problem.
  4. Argue that break-glass deploys are out of scope. They are production deploys; the claim was universal.

Step 2. Disclosed and remediating. What is the fix?

  1. Route break-glass through the same pipeline with a mandatory reason, automatic ticket creation, post-hoc review within 24 hours, and a central log — so the exception becomes a control with its own evidence rather than a hole. Emergency access must exist; it just has to be evidenced and reviewed like everything else.
  2. Require two approvals for break-glass in Slack. Still not an enforcing mechanism and still not durable evidence.
  3. Document that break-glass exists and is unreviewed. An honest description of a failing control is still a failing control.
  4. Remove the break-glass path entirely. Then a real emergency has no path and someone will improvise a worse one.

Step 3. After the audit?

  1. Add the finding to a risk register and move on. Registers do not enforce anything.
  2. Add a monthly control self-test that samples the same way the auditor does, owned by the control's engineer, so drift is found internally; and gate new in-scope systems on the control set with admission policy. Internal sampling turns annual surprises into monthly maintenance, and admission policy stops scope creep.
  3. Wait for next year's audit to check. That is how the same finding recurs.
In short

Tell the auditor about both deploys now, collect any existing evidence, and fix the break-glass path for the rest of the window.

Why

Interviewers use this to test integrity under pressure and whether you understand that exceptions must be designed as controls. The self-test — sampling yourself the way an auditor would — is the mechanism that separates a mature programme from an annual scramble.

The common mistake

Arguing that the break-glass deploys are out of scope. They are production deploys and the claim was universal; the only good move is disclosure plus remediation.

Read the docs

6 Find what's broken

An auditor samples this control register next month. Which four entries fail a Type II?

# control register (excerpt)
c1_claim = "all production access is approved and time-limited"
c1_mechanism = "engineers request access in Slack; a lead replies approved"
c1_evidence = "Slack history"
c2_claim = "all changes are peer reviewed"
c2_mechanism = "branch protection on main, one required review"
c2_evidence = "GitHub merge records"
c2_exception = "break-glass deploy script, no review, used ~monthly, not logged centrally"
c3_owner = "the compliance team"
In short

The failing entries are the Slack approval, the Slack-history evidence, the unlogged break-glass deploys, and the control with no engineering owner.

What's broken
  • Line 3: Approval by Slack reply is not a mechanism that enforces anything: nothing stops access being granted without the reply.
  • Line 4: Slack history is fragile, unstructured evidence with retention nobody controls, so a sampled date cannot be reconstructed.
  • Line 8: An unlogged break-glass path used monthly contradicts the peer-review claim, and the auditor will find it.
  • Line 9: The control has no engineering owner, so nobody can explain the mechanism or notice when it drifts.
Why

The branch-protection control (lines 5–7) is exactly right — claim, enforcing mechanism, durable evidence. What kills it is the undocumented exception on line 8, which is the single most common Type II finding.

Read the docs

Next lesson Security as a blocking gate: supply chain, review, immutable audit, and separation of duties
Drill · SOC 2, MiFID II and MiCA for engineers
0:00

Loading…