36. Controls
A control is what makes a principle happen: a policy the platform enforces, a check in a pipeline, a contract, a review. Each control must produce evidence that it works; a principle with no control, or a control with no evidence, is a gap.
The clip lays out Harbour Mutual's five principles on the left. One by one, the six controls appear in the middle, each linked to the principles it enforces and to the evidence it produces on the right: the glossary review and its decision log, the Claims contract checked in CI, the quality gate and its run log, Azure Policy denying public storage with its compliance report, and Purview's scans. Last, the gaps light up: no control enforces "owned", and the assistant's index filter leaves no evidence that it works.
The idea: principle, control, evidence
A principle says what must be true. A control is what makes it true, and comes in a few kinds:
- Preventive and automatic: Azure Policy denies a storage account with public access; a data contract check blocks a breaking change in CI.
- Detective and automatic: a quality gate quarantines a bad batch; a Purview scan finds an unclassified column.
- Human: a review that approves a new measure; an owner who signs off a dataset.
Every control must leave evidence: a compliance report, a gate's run log, a decision log. Evidence is what lets anyone, an auditor or Alex a year later, see that the control ran and what it found. The control register links all three, so the gaps show: a principle with no control is a wish; a control with no evidence is a hope.
A worked example: Harbour Mutual's control register
| Control | Kind | Enforces | Evidence |
|---|---|---|---|
| New measures are added to the semantic model only after the glossary review | Review | One definition | The review's decision log |
| The Claims data contract is checked in CI before every release | Data contract | One definition, Measured quality | CI runs: each change classified additive or breaking |
| The claims extract stops at the silver gate when a blocking rule fails | Quality gate | Measured quality | The gate's run log: batches passed and quarantined |
| Azure Policy denies storage accounts that allow public network access | Azure Policy | Private by default | Azure Policy's compliance report |
| Purview scans and classifies every source before it is shared | Purview policy | Classified before use | Purview's scan results: assets and their classifications |
| The assistant's index filters every chunk by the asker's groups | Review | Classified before use | none |
Two gaps: Owned has no control at all, and the assistant's index filter enforces "classified before use" but leaves no evidence. The principle is still covered, by Purview's scans; the control is not trustworthy until it leaves a record.
// Harbour Mutual's control ctl-deny-public: no storage account may allow public network access (principle pr-private).
targetScope = 'subscription'
@description('Deny or only audit: start with Audit to see what would be denied.')
@allowed([
'Audit'
'Deny'
])
param effect string = 'Deny'
resource denyPublicStorage 'Microsoft.Authorization/policyDefinitions@2025-03-01' = {
name: 'hm-deny-public-storage'
properties: {
displayName: 'Storage accounts must not allow public network access'
description: 'Control ctl-deny-public, for the principle pr-private: no data store is reachable from the internet.'
policyType: 'Custom'
mode: 'Indexed'
metadata: {
category: 'Storage'
principle: 'pr-private'
}
parameters: {
effect: {
type: 'String'
allowedValues: [
'Audit'
'Deny'
]
defaultValue: 'Deny'
}
}
policyRule: {
if: {
allOf: [
{
field: 'type'
equals: 'Microsoft.Storage/storageAccounts'
}
{
field: 'Microsoft.Storage/storageAccounts/publicNetworkAccess'
notEquals: 'Disabled'
}
]
}
then: {
effect: '[parameters(\'effect\')]'
}
}
}
}
resource assignDenyPublicStorage 'Microsoft.Authorization/policyAssignments@2025-03-01' = {
name: 'hm-deny-public-storage'
properties: {
displayName: 'Storage accounts must not allow public network access'
policyDefinitionId: denyPublicStorage.id
parameters: {
effect: {
value: effect
}
}
}
}
output complianceEvidence string = 'Azure Policy compliance report for assignment ${assignDenyPublicStorage.name}'Why it matters for Alex
Sooner or later someone asks Alex to prove that the medical notes are protected, or that the board's loss ratio is checked. "We have a principle" is not an answer; "here is the control, and here is last month's evidence" is. The register also shows where the next euro should go: to the principle with no control, before another control on a principle already covered.
Where it goes wrong
- Controls on paper. A design document says the index filters by group; nothing tests it.
- Evidence nobody keeps. The gate runs, but its log is deleted after a week.
- Everything manual. A monthly review for what Azure Policy could deny on every deployment.
- The register as a spreadsheet nobody owns. It drifts from what the platform really enforces.
Exercises
The lab checks each one against facts written down in advance, so any answer the brief allows passes. A pass is kept in this browser.
Find the gaps
Using the control register, decide how each principle stands.
What kind of control is it?
Choose the kind of each control in Harbour Mutual's register.
Close the gaps
Two gaps: no control enforces "Owned", and the index filter for "Classified before use" leaves no evidence. For each proposed control, decide whether it closes a gap: it must enforce the gap's principle and produce evidence.
On Azure
Controls and their evidence on Azure:
- Azure Policy: definitions with an effect (Audit to see, Deny to block, Modify or DeployIfNotExists to fix), grouped into initiatives and assigned at a management group or subscription; the compliance view is the evidence. Start a new policy with Audit, then switch to Deny.
- Microsoft Purview: Data Map scans that classify sources, sensitivity labels, data quality rules in the Unified Catalog, and access policies; scan results and quality scores are the evidence.
- Contracts and gates: a contract check in the producer's CI (GitHub Actions or Azure Pipelines) and quality gates in the pipelines (Fabric or Databricks), whose run histories are the evidence.
- Reviews: decisions recorded where the work is tracked (Azure DevOps or GitHub), never only in minutes.
Keep the policies as code beside the platform's Bicep, so a control changes only through a reviewed pull request.
Take it to work
Control register
Link each principle to the controls that enforce it and the evidence they produce.
Principles
- Each principle and any outside duty the controls must meet
Controls
- Each control, its kind and its owner
- The principles it enforces
Evidence
- What each control produces, where it is kept, and for how long
Gaps
- Principles with no control
- Controls with no evidence
Next
- The control that closes each gap, and who builds it
Tools in this chapter
- Contract editor · Write a data contract, validate it, and check whether a proposed change breaks its consumers.
- Quality workbench · Write quality rules, set thresholds, inject defects, and see the scores per dimension and per domain.
Terms taught here: ControlEvidenceAzure Policy