Skip to content

Your first privacy model

This walkthrough builds a small privacy model by hand. A generator such as OPP Engine writes the same document automatically; knowing its parts makes the generated draft easy to review.

opp: "0.1.0.dev0"
name: acme
organization: Acme Ltd
catalog: {name: baseline, version: "0.1.0"}

Sources, datasets and fields

Describe where private data lives. Locators identify a source without credentials.

sources:
  - id: crm
    type: database
    locator: postgresql://crm.internal/crm
    datasets:
      - name: public.customers
        type: table
        fields:
          - name: email
            classes:
              - {class: personal.email, confidence: 0.99, status: certified}
          - name: notes
            classes:
              - {class: org.account_notes, confidence: 0.8, status: proposed}

Concepts

Add the organization's own confidential topics. A concept extends a catalog class.

concepts:
  - id: org.account_notes
    label: Account notes
    description: Notes account managers write about a named customer's plans and problems.
    extends: confidential.people
    sensitivity: restricted
    cues: [renewal risk, escalation, churn]

Identifiers and terms

identifiers:
  - {id: customer_id, label: Customer ID, class: personal.record_identifier, pattern: "CU-[0-9]{6}"}

terms:
  - {term: Project Juniper, class: confidential.product, status: certified}

Rules

Start from the default matrix and add only the exceptions you need.

rules:
  overrides:
    - target: org.account_notes
      destination: internal
      action: pseudonymize
      reason: Notes are shared internally with the customer's name replaced.

Validate

opp validate acme.opp.yaml

The complete annotated example is examples/northwind-coaching.opp.yaml.